Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

IN C LANGUAGE USING MAX DATA STRUCUTURES Write a C program to collect and analyze Covid-19 related information of Greater Toronto Area (GTA) population for

IN C LANGUAGE USING MAX DATA STRUCUTURES

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

Write a C program to collect and analyze Covid-19 related information of Greater Toronto Area (GTA) population for provincial health ministry. Data Collected: Regions: o Peel o York o Durham Towns: o For Peel Brampton Mississauga o For York Maple Vaughan o For Durham Whitby Oshawa Race of head of the household which is supposed to be one of the following: o Caucasian, Indigenous, African American, Asian, Other The households yearly income -must be a positive number Number of people in the householdmust be an integer greater than 0 Number of household members tested for Covid-19 Number of household members tested positive for Covid-19 Instructions Create an application that should: Get information for up to three households from the user with data validation and store it in an array of structures of 100 households. For remaining records, randomly populate valid information in the array; User must be given a choice to skip manual data entry before entering each manually-entered record; Once the array is fully populated with manual data entry of up to three records and/or randomly generated records, use a text-based menu driven interface to perform following actions based on user input in a loop; A. Display household records only of a race or region or town; B. Races ranking by total number of household members tested for Covid-19; C. Races ranking by total number of household members tested positive for Covid-19; D. Regions ranking by total number of household members tested for Covid-19; E. Regions ranking by total number of household members tested positive for Covid-19; F. Towns ranking by total number of household members tested for Covid-19; G. Towns ranking by total number of household members tested positive for Covid-19; Basis of Poverty: a. Household of 1 with annual income of less than $20,000 b. Household of 2 with annual income of less than $25,000 c. Household of 3 with annual income of less than $30,000 d. Household of 4 with annual income of less than $35,000 e. Household of 5 or more with annual income of less than $40,000 H. Races ranking by poverty: Show races with highest to lowest percentage of poor households Note: approximate average/total income to nearest hundred and percentage to nearest integer. Create a well-designed modular program based on design techniques taught; Make appropriate use of header files; Use good naming conventions for all variables and functions; YOU MUST USE STRUCTRES -This progran analyzes and stores information related to Covid-19 cases- --and its impact on various races, regions and towns of GTA-- ------ Manual data entry module----- Provide data of up to three households or enter 9 to skip manual data entry and to generate records randonly Data entry for households 1 race: enter an integer: Indigenous(), Caucasian(1), African American(2), Asian(3), Others(4) region: enter an integer: Durhan(e), Peel(1), York (2) 1 town: enter an integer: Branpton(e), Mississauga (1) Enter annual household incone: Note!it will be rounded down to the nearest hundred. 567899 Enter nunber of household nenbers, members tested for Covid-19 and members tested positive for Covid-19 respectively as three integers separated by space or tab 342 Make sure you enter three positive integers in descending order, try again Enter nunber of household nenbers, members tested for Covid-19 and members tested positive for Covic-19 respectively as three integers separated by space or tab 332 Data entry for household# 2 race: enter an integer: Indigenous(), Caucasian(1), African American(2), Asian(3), Others (4) Skipping manual data entry and generating records randonly..... contents to file written successfully! Race Region Town Incone Fanily size Covid Tested Covid Positive 1 Indigenous Peet Mississauga 567880 3 3 2 2 Other York Vaughan 56888 3 Caucasian York Vaughan 15888 Other Peel Mississauga 184880 9 2 Asian Peel Brampton 59188 18 Caucasian York Vaughan 15280 18 7 African Anerican Durhan whitby 38180 3 8 Indigenous Peel Brampton 15980 11 9 Caucasian York Maple 59280 7 5 Indigenous Peel Mississauga 68568 11 11 Indigenous York Vaughan 88980 3 12 Asian Peel Mississauga 39680 18 9 13 Other Peel Mississauga 12980 7 5 Peel Brampton 5.no 3 1 3 6 6 8 1 8 10 7 18 5 11 1 5 14 Caucasian 35880 7 1 1 2 3 2 3 4 9 4 2 9 6 5 18 Enter number of household members, members tested for Covid-19 and members tested positive for Covid-19 respectively as three integers separated by space or tab 332 Data entry for households 2 race: enter an integer: Indigenous(), Caucasian(1), African American(2), Asian(3), Others (4) Skipping manual data entry and generating records randonly..... contents to file written successfully! S.no Race Region Town Incone Fanily size Covid tested Covid Positive Indigenous Peel Mississauga 567890 3 3 Other York Vaughan 56899 9 Caucasian York Vaughan 15888 2 1 Other Peel Mississauga 184888 Asian Peel Brampton 59109 6 Caucasian York Vaughan 15200 18 7 African American Durhan Whitby 30100 8 8 Indigenous Peel Brampton 15900 11 6 1 9 Caucasian York Maple 59200 10 Indigenous Peel Mississauga 68500 11 10 11 Indigenous York Vaughan 88980 11 5 12 Asian Peel Mississauga 39600 10 9 13 Other Peel Mississauga 12980 5 5 14 Caucasian Peel Brampton 35000 7 15 Other Peel Branpton 83200 11 9 16 African American York Vaughan 14708 11 17 Indigenous Durhan Whitby 25660 1 18 Caucasian York Maple 73300 19 Asian Peel Mississauga 58600 20 Other Peel Mississauga 71100 7 3 6 3 8 7 5 7 3 1 7 4 1 2 4 9 9 9 7 7 2 --Above household information is obtained from voluntary contributors to the survey-- Main menu: Enter your choice to display 1. Household records by race, region, or town 2. Races ranking for Covid-19 3. Regions ranking for Covid-19 4. Towns ranking for Covid-19 5. Races ranking by poverty 8. Exit Main menu: 1 Enter your choice to display 1. Household records by race, region, or town 2. Races ranking for Covid-19 3. Regions ranking for Covid-19 4. Towns ranking for Covid-19 5. Races ranking by poverty 8. Exit 1 Enter an integer to see household records of a particular race (), region (1), or town (2) Enter an integer: Durhan(), Peel(1), York(2) 1 S.no Race Region Town Income Fanily size Covid Tested Covid Positive 1 Indigenous Peel Mississauga 567800 3 3 2 2 Other Peel Mississauga 184800 9 2 3 Asian Peel Branpton 59108 10 6 3 Indigenous Peel Branpton 15988 11 6 1 5 Indigenous Peel Mississauga 60500 11 10 7 6 Asian Peel Mississauga 39600 10 9 1 Other Peel Mississauga 12988 7 5 8 Caucasian Peel Branpton 35800 7 9 Other Peel Branpton 83200 11 9 2 10 Asian Peel Mississauga 58680 11 7 11 Other Peel Mississauga 71100 7 4 5 4 1 9 --Above household infornation is obtained from voluntary contributors to the survey-- Main menu: Enter your choice to display 1. Household records by race, region, or town 2. Races ranking for Covid-19 3. Regions ranking for Covid-19 4. Towns ranking for Covid-19 5. Races ranking by poverty 8. Exit Main menu: Enter your choice to display 1. Household records by race, region, or town 2. Races ranking for Covid-19 3. Regions ranking for Covid-19 4. Towns ranking for Covid-19 5. Races ranking by poverty 8. Exit 2 Enter to see all Covid-19 cases tested or 1 for only tested positive cases or 9 to go back to the nain menu 1 --Races ranking of Covid-19-- Races : Covid Positive African American : 7 Asian : 11 Indigenous : 14 Caucasian : 15 Other : 16 --Above household infornation is obtained fron voluntary contributors to the survey-- Main nenu: Enter your choice to display 1. Household records by race, region, or town 2. Races ranking for Covid-19 3. Regions ranking for Covid-19 4. Towns ranking for Covid-19 5. Races ranking by poverty 8. Exit (Since options 2, 3 and 4 are similar, therefore output for only option 2 is shown) 5 6 S.no Race 1 Indigenous 2 Caucasian 3 Asian 4 Caucasian Other Indigenous 7 African American 8 African American 9 Indigenous 10 Other 11 Asian 12 African American 13 Caucasian 14 Asian 15 African Anerican 16 Caucasian 17 Indigenous 18 Indigenous 19 African Anerican 20 Other Region Durhan Peel Peel York Durhan Peel Peel Durhan York York York York Peel Durhan York Peel Peel Peel Durhan York Town Whitby Brampton Brampton Vaughan Oshawa Brampton Mississauga Oshawa Maple Maple Vaughan Vaughan Mississauga Whitby Vaughan Mississauga Brampton Mississauga whitby Vaughan Income 32680 77686 73080 98780 59480 56480 82280 27180 22100 35380 34580 50780 29880 185980 15780 56980 45680 25480 76180 27380 Family size Covid Tested Covid Positive 8 4 4 9 7 6 9 9 8 3 11 7 3 11 4 1 7 4 1 18 10 5 9 8 5 9 1 7 6 5 18 6 5 8 6 5 6 4 11 10 9 6 4 8 5 1 5 3 11 10 3 10 7 10 --Acknowledgnent: above infornation is obtained fron voluntary contributors to the survey---- Main nenu: Enter your choice to display 1. Household records by race, region, or town 2. Races ranking for Covid-19 3. Regions ranking for Covid-19 4. Towns ranking for Covid-19 5. Races ranking by poverty 8. Exit 5 Race : Percent households below poverty line Caucasian : 25 Asian : 339 African American : Indigenous : Other : 66% 489 689 --Acknowledgment: above infornation is obtained fron voluntary contributors to the survey

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

Step: 3

blur-text-image

Ace Your Homework with AI

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

Get Started

Students also viewed these Databases questions

Question

Is the person willing to deal with the consequences?

Answered: 1 week ago