Question: Please Read The Question Carefully, and then answer. Write a complete C++ program that helps the Ministry of Health (MOH) to determine the status of

Please Read The Question Carefully, and then answer.

Please Read The Question Carefully, and then answer. Write a complete C++program that helps the Ministry of Health (MOH) to determine the statusof a zone by calculating the number of active cases for COVID19. The program should perform the following tasks: Task 1: Write a

function named dispStatus. (10 marks) a) This is a non-returning function. b)

Write a complete C++ program that helps the Ministry of Health (MOH) to determine the status of a zone by calculating the number of active cases for COVID 19. The program should perform the following tasks: Task 1: Write a function named dispStatus. (10 marks) a) This is a non-returning function. b) It takes the number of active cases as an input parameter. c) The function should display the status of a zone based on the conditions in Table 1. Table 1 Number of active cases Status of zone Above 40 Red 21 until 40 Orange 1 until 20 Yellow No case Green Task 2: Write a function named getInput. (7 marks) a) This is a non-returning function. b) It takes the number of total cases, new cases, total death, and total recovered as input parameters. c) The function should ask the user to enter the number of total cases, new cases, total death, and total recovered. d) It sends all the values entered by the user in (c) back to the calling module through the use of reference parameters. Task 3: Write a function named dispOutput. (4 marks) a) This is a non-returning function. b) It takes the number of active cases as an input parameter. c) The function should display the number of active cases and zone status by calling the dispStatus function. Task 4: Write a function named calcAverage. (4 marks) a) It takes the number of states and total active cases as input parameters. b) The function should calculate the average number of active cases per state. c) It should return the average value calculated in (b). Task 5: Write a main function to perform the following tasks: (29 marks) a) You need to use an appropriate LOOP to perform the process in this function. The loop will be repeated when the user press ENTER. b) You are NOT ALLOWED to use arrays except an array of characters. c) The function should ask the user to enter a state name. d) The function may need to call the functions that are defined in Task 2, Task 3, and Task 4. e) The function should calculate the number of active cases for Covid 19 using the following formula: Number of active cases = Total cases + New cases - Total Death - Total Recovered f) The function should determine the state with the highest number of active cases and calculate the number of states, and the total number of active cases for all states. Note: You are NOT ALLOWED to use any predefined function(s) to determine the highest number of active cases. g) The program should produce the output as in the sample execution given below. Note: The values in bold are input by the user. Task 6: List all function prototypes. (4 marks) Task 7: You must ensure your program fulfill the following criteria: (7 marks) a) The program is able to run. b) The program uses an appropriate structure for the program (e.g. all required header files are included, the program is properly written, proper indentation, etc.) SAMPLE PROGRAM EXECUTION >>> >> State name : Negeri Sembilan Total cases : 7103 New cases : 57 Total death : 11 Total recovered: 6274 >>> Active cases : 875 Status : Red zone Press to continue... > State name : Johor Total cases : 3421 New cases : 167 Total death : 32 Total recovered: 1985 >>>>>>>>>> Active cases : 1571 Status : Red zone Press to continue... > State name : Perak Total cases : 2888 New cases : 17 Total death : 16 Total recovered: 2503 > Active cases : 386 Status : Red zone : Press to continue... >>> State name : Perlis Total cases : 44 New cases : 1 Total death Total recovered: 41 : 2 >>>>>>>>>> Active cases : 2 Status : Yellow zone Press to continue... >>>>>>>>>>>> State name : Pulau Pinang Total cases : 2978 New cases : 23 Total death : 9 Total recovered: 2743 > Active cases : 249 Status : Red zone Press to continue...N

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!