Question
In this project, you will create a simple Java console application that keeps records of COVID19 Vaccines and displays stored data. Vaccine Class Mandatory Requirements:
In this project, you will create a simple Java console application that keeps records of COVID19
Vaccines and displays stored data.
Vaccine Class Mandatory Requirements:
- Private Data-Members: (Make sure to use recommended variable naming conventions
and appropriate data type for each of the data members):
o set of numbers to represent vaccine id
o alpha-numeric data used to store vaccine name
o decimal to store the cost of one unit of the vaccine
o a number to store the number of available units
o a date that stores the expiry date of the vaccine
o set of special instructions on how to handle the vaccine
- Public Member Functions:
o Include a set (mutator) and get (accessor) method for each data member.
o Default and parameterized constructor(s). If arguments are not specified when a
vaccine is instantiated, then choose meaningful default values.
o A display function that takes a Boolean parameter and displays the details of the
vaccine as follows:
▪ If the Boolean value is true, it will display the details of the vaccine in a
table format; consider an output like:
SKU | Vaccine Name | Unit Cost | QTY | Expiry | Special Instructions
-----|--------------|-----------|-----|--------|---------------------
▪ If the Boolean value is false, it will display the details of the vaccine in a
non-linear format; consider an output like:
SKU:
Vaccine Name:
Unit Cost:
Quantity on hand:
Expiry Date:
Special Instructions:
2
Driver Class Specifications (Main)
The primary purpose of the driver class would be to do the following:
- an empty Vaccine using the default constructor.
- Display the values of the Vaccine in a non-linear format.
- Use the setters to add values to the empty Vaccine you just created (data of your choice)
(you can hard code the values or read them from the console).
- Display the values of the Vaccine in a non-linear format.
- Use the parameterized Constructor to create at least two more vaccines (data of your
choice) (you can hard code the values or read them from the console) (You can create as
many vaccines as you want).
- an array to save all the vaccines that you have.
- Use the array to display the contents of your Vaccines in a table format.
General Requirements
- Include an opening comment with your name, the name of the program, the date, and a
short description.
- Follow the style guide! Use descriptive names and sensible datatypes that follow our
naming conventions for variables, constants, arrays, functions, etc. Use good spacing and
ensure braces ({}) are located where they should be.
- Output messages must be meaningful. Displaying values is not enough; the user must
understand what he sees.
- Your design should implement strong encapsulation rules.
- Your design should implement modularity concepts
Step by Step Solution
There are 3 Steps involved in it
Step: 1
import javautilDate public class Vaccine private int id private String name private double cost private int quantity private Date expiryDate private S...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started