Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Coronavirus Disease 2019 (COVID-19) is an infectious disease that can cause respiratory illness. To combat this infectious disease from spreading, the Malaysian government introduced the

image text in transcribedimage text in transcribed

Coronavirus Disease 2019 (COVID-19) is an infectious disease that can cause respiratory illness. To combat this infectious disease from spreading, the Malaysian government introduced the Colour Zone Indicator to classify affected areas as Green, yellow, Orange and Red based on the number of cases as shown in Table 1. Table 1: Zone Classification Number of cases Indicator 0 Green 1 - 20 Yellow 21 - 40 Orange 41 and above Red Write a program that can read and keep the records of cases. The structure of the data named classify and its fields is as follows: Record Field Description district Name District name (30 characters) totalCase Total number of cases integer value) readingCase An array that keep FIVE (5) numbers of case readings (integer value) of FIVE (5) days indicator Indicator based on Table 1(10 characters) The program must contain the following user-defined functions: d. read(): This function reads/gets the data for THREE (3) district names and FIVE (5) number of case readings of FIVE (5) days for each district. e. total_and_indicator (): This function will calculate the total number of cases and determine the colour zone indicator for each district. f. display(): This function displays all required data - the district name, the total number of cases and the zone indicator Coronavirus Disease 2019 (COVID-19) is an infectious disease that can cause respiratory illness. To combat this infectious disease from spreading, the Malaysian government introduced the Colour Zone Indicator to classify affected areas as Green, yellow, Orange and Red based on the number of cases as shown in Table 1. Table 1: Zone Classification Number of cases Indicator 0 Green 1 - 20 Yellow 21 - 40 Orange 41 and above Red Write a program that can read and keep the records of cases. The structure of the data named classify and its fields is as follows: Record Field Description district Name District name (30 characters) totalCase Total number of cases integer value) readingCase An array that keep FIVE (5) numbers of case readings (integer value) of FIVE (5) days indicator Indicator based on Table 1(10 characters) The program must contain the following user-defined functions: d. read(): This function reads/gets the data for THREE (3) district names and FIVE (5) number of case readings of FIVE (5) days for each district. e. total_and_indicator (): This function will calculate the total number of cases and determine the colour zone indicator for each district. f. display(): This function displays all required data - the district name, the total number of cases and the zone indicator

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Seven NoSQL Databases In A Week Get Up And Running With The Fundamentals And Functionalities Of Seven Of The Most Popular NoSQL Databases

Authors: Aaron Ploetz ,Devram Kandhare ,Sudarshan Kadambi ,Xun Wu

1st Edition

1787288862, 978-1787288867

More Books

Students also viewed these Databases questions