Question: Programming language: java Part 1: Write a program called InfectionCalculator2 that: Reads the name of the state, the Rt number, and the current number of

Part 1: Write a program called InfectionCalculator2 that: Reads the name of the state, the Rt number, and the current number of cases from the terminal. Using these numbers, the program should print the number of expected cases over five successive time periods. o The number of cases should be rounded, use commas, and have no decimal places The output of your code should look like this for the Hawaii data, where user input is indicated in green italics: State: Hawaii Current number of cases in Hawaii: 12123 Current Rt in Hawaii: 1.08 COVID-19 spread in Hawaii using Rt=1.08 and starting at 12,123 cases TO: 12,123 T1: 13,093 T2: 14,140 T3: 15,271 T4: 16,493 T5: 17,813 Run your program using the data for all four states: Hawaii, Washington, Oregon, and California. You shouldn't have to change your program at all, just run it and enter different data. Part 2: Write a program called InfectionCalculator3 that: Does the same thing as InfectionCalculator2, but gets its data from files instead of from user input. There are four data files in the Week03 folder in the Resources part of Laulima. The file names are: Hawaii.txt Washington.txt Oregon.txt Califomia.txt Each file has three lines and contains the data for a state: The first line is the name of the state . The second line is R. The third line is the current number of cases Your program should first ask the user for the name of a state. Your program should combine the user input with the extension .txt, and then open the appropriate file. For example, if the user types in Hawaii, then the program will open the file Hawaii.txt. The program should then read the data from the file and use it to calculate and print the appropriate output in exactly the same way as InfectionCalculator2. The output of your code should look like this for the Hawaii data, whero user input is indicated in green italics: Name of the state: Hawait COVID-19 spread in Hawaii using Rt=1.88 and starting at 12,123 cases TO: 12, 123 T1: 13,993 T2: 14, 140 T3: 15,271 T4: 16,493 T5: 17,813 $ Note 1. The data files need to be moved from Laulima to the computer that your program is running on and placed in the same folder/directory as your program project. If you don't have the files in the right places, you'll get a FileNotFoundException. Note 2: It is critical that the user types in the file name exactly right (case sensitive) so that the program can open the correct file. If the wrong input is typed into the program, it will crash Later, we will learn how to deal with program crashes from bad user input. . Remember: Start every program with a block comment that: Starts with the line "ICS 111 Assignment X" (replacing X with the assignment Bumber) Next has an @author tag with your name: Next has an explanation of the purpose of the program
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
