Question: S QUESTION 3 a) Write a function definition which has the number of appointments, as a value parameter, and three reference parameters for the vaccine

S QUESTION 3 a) Write a function definition which has the number of appointments, as a value parameter, and three reference parameters for the vaccine types. For each appointment, the user can enter the vaccine type code. Then, the function can determine the type of vaccine for each appointment based on the following table. Code Vaccine Name Pfizer Sinovac AstraZeneca Other code Invalid code message is displayed The function can also calculate the total number for each vaccine type, and pass these values through three reference parameters to the caller function. (8 marks) b) Write a function definition that has three value parameters, represent the number of three different vaccine (Pfizer, Sinovac, AstraZeneca). The function displays the number of vaccine types for a vaccination centre. The function will also calculate and display the total number of vaccines in the centre. The total number of all the vaccines is returned to the caller through return data type. (7 marks)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
