Question: Problem 4(25 points)-Write a program Submit infection.c (Create a linked list-0 points without a linked list) Nadia works for the World Health Organization and atches

 Problem 4(25 points)-Write a program Submit infection.c (Create a linked list-0

points without a linked list) Nadia works for the World Health Organization

and atches for infectious disease outbreaks. She is currently monitoring 4 countries

(information is kept in a file) and every time numbers start approaching

a certain level (given as the second argument on the command line),

Problem 4(25 points)-Write a program Submit infection.c (Create a linked list-0 points without a linked list) Nadia works for the World Health Organization and atches for infectious disease outbreaks. She is currently monitoring 4 countries (information is kept in a file) and every time numbers start approaching a certain level (given as the second argument on the command line), she sends in aid workers (there are a maximum of 50 aid workers available). She has asked you to create a program that monitors the daily number of cases-whenever cases hit the level given on the command line, it should alert her with the word prompt Careful... (see sample run) The file info is kept in the following format: Country 1,a,29,.04 where Country 1 is the name of the ountry, a is the virus, 29 is the number of initial cases and .04 is the daily infection rate. The program should have the following functionality: 1. The user can either push enter (to move to the next day) or enter the letter s (see sample run) to move the program along. If the user pushes enter, the program proceeds to the next day (so if you are currently viewing Day 1, pushing enter will move you to Day 2). If the user enters s, he or she is prompted to enter the country name and the number of aid works they want to send Aid workers are sent in multiples of 10. This means if the user enters a number of aid workers that is not a multiple of 10, the user will be prompted again The program should check to make sure there are enough aid workers to send. For example you cannot request 20 aid workers when there are only 10 available b. The program should continue until there are no more aid workers left. 3. For every 10 aid workers sent, the rate of infection decreases by 01. The calculation of current cases is now calculated using this new rate (you can imagine that sending in aid workers has the effect of ening the total number of current cases and this is reflected in the calculation 4. If the user tries to send aid workers after the infection rate becomes 0, the program should let the user know there is nothing more to do. Note that at 0 percent, the number of cases will return back to the ber of cases (you can imagine that this represents the fact that you can get the number of cases to the original level, but not completely eradicate the virus) ou must use the following struct for your nodes (DO NOT MODIFY) Problem 4(25 points)-Write a program Submit infection.c (Create a linked list-0 points without a linked list) Nadia works for the World Health Organization and atches for infectious disease outbreaks. She is currently monitoring 4 countries (information is kept in a file) and every time numbers start approaching a certain level (given as the second argument on the command line), she sends in aid workers (there are a maximum of 50 aid workers available). She has asked you to create a program that monitors the daily number of cases-whenever cases hit the level given on the command line, it should alert her with the word prompt Careful... (see sample run) The file info is kept in the following format: Country 1,a,29,.04 where Country 1 is the name of the ountry, a is the virus, 29 is the number of initial cases and .04 is the daily infection rate. The program should have the following functionality: 1. The user can either push enter (to move to the next day) or enter the letter s (see sample run) to move the program along. If the user pushes enter, the program proceeds to the next day (so if you are currently viewing Day 1, pushing enter will move you to Day 2). If the user enters s, he or she is prompted to enter the country name and the number of aid works they want to send Aid workers are sent in multiples of 10. This means if the user enters a number of aid workers that is not a multiple of 10, the user will be prompted again The program should check to make sure there are enough aid workers to send. For example you cannot request 20 aid workers when there are only 10 available b. The program should continue until there are no more aid workers left. 3. For every 10 aid workers sent, the rate of infection decreases by 01. The calculation of current cases is now calculated using this new rate (you can imagine that sending in aid workers has the effect of ening the total number of current cases and this is reflected in the calculation 4. If the user tries to send aid workers after the infection rate becomes 0, the program should let the user know there is nothing more to do. Note that at 0 percent, the number of cases will return back to the ber of cases (you can imagine that this represents the fact that you can get the number of cases to the original level, but not completely eradicate the virus) ou must use the following struct for your nodes (DO NOT MODIFY)

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!