Write a JAVA program that determines the alert level for the COVID-19 based on the percentage of new cases out of PCR tests carried out as indicated in the following table: Percentage of New Cases <2% Between 2% and 5% (inclusive) Between 5% and 8% (exclusive) 8% or above Alert Level Green Yellow Orange Red % of new cases = (number of new cases / number of PCR tests) x 100 The program should ask the user to input the number of new cases and the number of PCR tests that were carried out. The program should display the percentage of new cases and the alert level. Sample Input / Output Enter the number of new cases: 280 Enter the number of PCR tests: 12000 Percentage of new cases is 2.333333333333335% Alert Level is Yellow

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter5: Making Decisions
Section: Chapter Questions
Problem 4PE
icon
Related questions
Question
100%
Write a JAVA program that determines the alert level for the COVID-19 based on the percentage of new cases out of PCR tests
carried out as indicated in the following table:
Percentage of New Cases
< 2%
Between 2% and 5% (inclusive)
Between 5% and 8% (exclusive)
8% or above
Alert Level
Green
Yellow
Orange
Red
% of new cases = (number of new cases / number of PCR tests) x 100
The program should ask the user to input the number of new cases and the number of PCR tests that were carried out. The program
should display the percentage of new cases and the alert level.
Sample Input / Output
Enter the number of new cases: 280
Enter the number of PCR tests: 12000
Percentage of new cases is 2.333333333333335%
Alert Level is Yellow
Note: Your answer should follow the given sample input / output.
Transcribed Image Text:Write a JAVA program that determines the alert level for the COVID-19 based on the percentage of new cases out of PCR tests carried out as indicated in the following table: Percentage of New Cases < 2% Between 2% and 5% (inclusive) Between 5% and 8% (exclusive) 8% or above Alert Level Green Yellow Orange Red % of new cases = (number of new cases / number of PCR tests) x 100 The program should ask the user to input the number of new cases and the number of PCR tests that were carried out. The program should display the percentage of new cases and the alert level. Sample Input / Output Enter the number of new cases: 280 Enter the number of PCR tests: 12000 Percentage of new cases is 2.333333333333335% Alert Level is Yellow Note: Your answer should follow the given sample input / output.
Expert Solution
steps

Step by step

Solved in 4 steps with 2 images

Blurred answer
Knowledge Booster
Random Class and its operations
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT