Answered step by step
Verified Expert Solution
Question
1 Approved Answer
8 . Vaccine Class Vaccine - VaccineID: int - VaccineName: String - manufacturer: String - expiryDate: String + Vaccine ( ) + Vaccine ( int
Vaccine Class
Vaccine
VaccineID: int
VaccineName: String
manufacturer: String
expiryDate: String
Vaccine
VaccineintString, String, String
getVaccinationId: int
setVaccinationIdint
getVaccineName: String
setVaccineNameString
getManufacturer: String
setManufacturerString
getExpiryDate: String
setExpiryDateString
toString: String
a How many constructors does the class Vaccine provide?
b How many methods does the class Vaccine provide?
c How many instance variables does the class Vaccine have?
d Briefly explain the purpose of the following two lines of code:
Vaccine Pfizer;
Pfizer new Vaccine;
e The two lines of code can be combined into one. Provide this one line of code:
f What method is used to set the VaccineID of an instance of the Vaccine class? What data type does it expect as an argument?
g What method is used to set the VaccineName of an instance of the Vaccine class? What data type does it expect as an argument?
Step by Step Solution
There are 3 Steps involved in it
Step: 1
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