Write a Java program that does the following: 1. In the main() method complete the following: 1. Read number of days that a patient has entered the hospital ( i.e 5 days) 2. Read number of times that nurse read the temperature of the patient in Celsius (3,4, 5, time, oreven more) 4. Read 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. (use any type of sorting. You can't use build-in methods) 5. Call printArray method to print the sorted array on screen. 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. The patient can leave only if the average for the last two highest read temperatures in the last two days was around normal (35.5-36.5 C). Sample: Days sof 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 5 40.9 38.5 38.9 40.1 39.8 4. 3 38.2 38.2 37.9 5 37.5 37.2
Write a Java program that does the following: 1. In the main() method complete the following: 1. Read number of days that a patient has entered the hospital ( i.e 5 days) 2. Read number of times that nurse read the temperature of the patient in Celsius (3,4, 5, time, oreven more) 4. Read 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. (use any type of sorting. You can't use build-in methods) 5. Call printArray method to print the sorted array on screen. 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. The patient can leave only if the average for the last two highest read temperatures in the last two days was around normal (35.5-36.5 C). Sample: Days sof 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 5 40.9 38.5 38.9 40.1 39.8 4. 3 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...
Related questions
Question
use java to solve this question , you are not allow touse oop , the out put should be like this
The maximum temperature is: 41.3
The minimum tempreture is: 37.2
The Average is: 39.61
Total Number of reading Below average is 8
Total Number of reading Above average is 11
After Sort array
4.0 38.7 39.8 40.5 41.0
5.0 40.7 40.8 41.2 41.3 41.3
5.0 38.5 38.9 39.8 40.1 40.9
3.0 37.9 38.2 38.2
2.0 37.2 37.5
Your average is not Stable and it's:37.78 C, You can't leave
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 2 images
Recommended textbooks for you
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 Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
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 Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
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
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY