Write a Java program that does the following: Write a Java program that does the following: 1. In the main() method complete the following: 1. Ask a user to enter the number of days that a patient has entered the hospital ( i.e 5 days) 2. Ask the user to enter the number of times that nurse read the temperature of the patient in Celsius (3,4, 5, time, or even more) 4. Ask the user to enter the temperature that was read by the nurse and store each temperature in the array. 5. If the user enters a temperature below 30 C or above 45C, then display an error message and keep looping till the program gets the right. 2. Write just one method (Summary) that called from the main method and return average, maximum, and minimum of temperatures. Print the result on screen from the main method. 3. Call another method call it countbelowAboveAverage that will return a number of temperatures less than or equal to the average of temperatures, and the number of temperatures above the average. 4. Call sorting method (sortArray ) that will sort the temperatures (per day) in ascending order during all days store it in a new 2D dimensional array and return it to main. 5. Call printArray method to print the sorted array on screen. 6. Call a method (leaveHospital) that will return yes he/she can leave or no, he/she can't leave, to check if he/she can leave the hospital. He/she can leave only if the average for last two highest read temperature was around normal (35.5-36.5 C). Sample: Days #of Readings Actual Reading Per Day (in Celsius) 40.5 41 39.8 38.7 2 41.2 41.3 40.7 40.8 41.3 3 40.9 38.5 38.9 40.1 39.8 4 38.2 38.2 37.9 5 37.5 37.2

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
I need the answer as soon as possible
Write a Java program that does the following:
Write a Java program that does the following:
1. In the main() method complete the following:
1. Ask a user to enter the number of days that a patient has entered the hospital ( i.e 5 days)
2. Ask the user to enter the number of times that nurse read the temperature of the patient in Celsius (3,4, 5, time, or even more)
4. Ask the user to enter the temperature that was read by the nurse and store each temperature in the array.
5. If the user enters a temperature below 30 C or above 45C, then display an error message and keep looping till the program gets the right.
2. Write just one method (Summary) that called from the main method and return average, maximum, and minimum of temperatures.
Print the result on screen from the main method.
3. Call another method call it countbelowAboveAverage that will return a number of temperatures less than or equal to the average of
temperatures, and the number of temperatures above the average.
4. Call sorting method (sortArray ) that will sort the temperatures (per day) in ascending order during all days store it in a
new 2D dimensional array and return it to main.
5. Call printArray method to print the sorted array on screen.
6. Call a method (leaveHospital) that will return yes he/she can leave or no, he/she can't leave, to check if he/she can leave the hospital. He/she
can leave only if the average for last two highest read temperature was around normal (35.5-36.5 C).
Sample:
Days
#of Readings
Actual Reading Per Day (in Celsius )
4
40.5
41
39.8
38.7
5
41.2
41.3
40.7
40.8 41.3
3
40.9
38.5
38.9
40.1 39.8
4
3
38.2
38.2 37.9
5
2
37.5
37.2
Transcribed Image Text:Write a Java program that does the following: Write a Java program that does the following: 1. In the main() method complete the following: 1. Ask a user to enter the number of days that a patient has entered the hospital ( i.e 5 days) 2. Ask the user to enter the number of times that nurse read the temperature of the patient in Celsius (3,4, 5, time, or even more) 4. Ask the user to enter the temperature that was read by the nurse and store each temperature in the array. 5. If the user enters a temperature below 30 C or above 45C, then display an error message and keep looping till the program gets the right. 2. Write just one method (Summary) that called from the main method and return average, maximum, and minimum of temperatures. Print the result on screen from the main method. 3. Call another method call it countbelowAboveAverage that will return a number of temperatures less than or equal to the average of temperatures, and the number of temperatures above the average. 4. Call sorting method (sortArray ) that will sort the temperatures (per day) in ascending order during all days store it in a new 2D dimensional array and return it to main. 5. Call printArray method to print the sorted array on screen. 6. Call a method (leaveHospital) that will return yes he/she can leave or no, he/she can't leave, to check if he/she can leave the hospital. He/she can leave only if the average for last two highest read temperature was around normal (35.5-36.5 C). Sample: Days #of Readings Actual Reading Per Day (in Celsius ) 4 40.5 41 39.8 38.7 5 41.2 41.3 40.7 40.8 41.3 3 40.9 38.5 38.9 40.1 39.8 4 3 38.2 38.2 37.9 5 2 37.5 37.2
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 2 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY