Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
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