PARTNEREN mm mm 18 19 20 21 22 23 24 25 26 27 28 29 30 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 System.out.print("patient's age: "); // feature I = > feature 2 System.out.print("Patient's zip code: "); > int zip = sc.nextInt(); while(String.valueof(zip).length() != 5) { System.out.print("Invalid zip code, enter valid zip code: "); zip = sc.nextInt (); } if(string.valueof (zip).length() == 5) break; System.out.print("Is our hospital \"in network\" for the patient's insurance?"); →→ String insurance = sc.next(); System.out.print("Patient pain level (1-10): "); -> 4 int pain = sc.nextInt(); while(pain < 1 || pain >10) { System.out.print("Invalid pain level, enter valid pain level (1-10): "); pain = sc.nextInt(); } if(pain >=1 && pain <=10) break; System.out.print("Patient temperature (in degress Fahrenheit): "); double temperature = sc.nextDouble(); => ig hore it →5

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

Image 1 is my code, and image 2 is how to calculate the score.

i need to write 2 methods (Inalready wrote the method 3)

Method 3: A method to collect the required patient information (age, zip code, insurance information, pain level, and temperature) and compute the priority score

    • takes one Scanner parameter

    • returns the computed score

       

      Method 4: A method to calculate the priority score of the patient (this method should be called in the method 3) 

      • takes five parameters, once for each patient feature

      • returns the computed score

18
19
20
21
22
23
24
25
26
27
28
29
30
NNNNI
33
34
35
www
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
public static int priorityScore(Scanner sc) {
System.out.print("Patient's age: "); 기
int age = sc.nextInt();
System.out.print("Patient's zip code: "); >
int zip = sc.nextInt();
while(String.valueOf (zip).length() != 5) {
System.out.print("Invalid zip code, enter valid zip code: ");
zip = sc.nextInt ();
}
if(string.valueOf (zip).length()
break;
feature I
feature 2
==
}
5)
System.out.print("Is our hospital \"in network\" for the patient's insurance? "); →→
String insurance = sc.next();
->4
System.out.print("Patient pain level (1-10): ");
int pain = sc.nextInt();
if (pain >=1 && pain <=10)
break;
while(pain < 1 || pain >10) {
System.out.print("Invalid pain level, enter valid pain level (1-10): ");
pain = sc.nextInt ();
System.out.print("Patient temperature (in degress Fahrenheit): "); →
double temperature= sc.nextDouble();
- ig hore it
Transcribed Image Text:18 19 20 21 22 23 24 25 26 27 28 29 30 NNNNI 33 34 35 www 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 public static int priorityScore(Scanner sc) { System.out.print("Patient's age: "); 기 int age = sc.nextInt(); System.out.print("Patient's zip code: "); > int zip = sc.nextInt(); while(String.valueOf (zip).length() != 5) { System.out.print("Invalid zip code, enter valid zip code: "); zip = sc.nextInt (); } if(string.valueOf (zip).length() break; feature I feature 2 == } 5) System.out.print("Is our hospital \"in network\" for the patient's insurance? "); →→ String insurance = sc.next(); ->4 System.out.print("Patient pain level (1-10): "); int pain = sc.nextInt(); if (pain >=1 && pain <=10) break; while(pain < 1 || pain >10) { System.out.print("Invalid pain level, enter valid pain level (1-10): "); pain = sc.nextInt (); System.out.print("Patient temperature (in degress Fahrenheit): "); → double temperature= sc.nextDouble(); - ig hore it
Each patient starts out with a base score of 100, which then is increased or decreased based on the inputted
information as follows:
• If the age of the patient is a child (younger than 12 years old) or a senior citizen (at least 75 years old), add 50
to their score.
• If the first digit of their zip code is the same as the first digit of the hospital's zip code, add 25 to their score. If
the second digit of their zip code also matches the second digit of the hospital's zip code, add another 15 to
their score.
o NOTE: If the first digit of each zip code doesn't match, then it doesn't matter whether the second digits
of each zip code match - no change should be made to the patient's priority score.
• If the hospital is "in-network" for the patient's medical insurance, add 50 to their score.
• Take the patient's reported pain level, multiply it by 10, and add it to their score.
• If the patient's temperature is above 99.5 degrees Fahrenheit, add 8 to their score.
Transcribed Image Text:Each patient starts out with a base score of 100, which then is increased or decreased based on the inputted information as follows: • If the age of the patient is a child (younger than 12 years old) or a senior citizen (at least 75 years old), add 50 to their score. • If the first digit of their zip code is the same as the first digit of the hospital's zip code, add 25 to their score. If the second digit of their zip code also matches the second digit of the hospital's zip code, add another 15 to their score. o NOTE: If the first digit of each zip code doesn't match, then it doesn't matter whether the second digits of each zip code match - no change should be made to the patient's priority score. • If the hospital is "in-network" for the patient's medical insurance, add 50 to their score. • Take the patient's reported pain level, multiply it by 10, and add it to their score. • If the patient's temperature is above 99.5 degrees Fahrenheit, add 8 to their score.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Follow-up Questions
Read through expert solutions to related follow-up questions below.
Follow-up Question

Thank you again!

Further with method 3 and four I need add one more method, assume I have multiple patients.
please provide a screenshot.

see the image for the requirements 

 

6. A method to print out the overall statistics for the day
o takes two parameters-- the number of patients and the maximum score
o no return value
J:
ided in your Workspace)
Transcribed Image Text:6. A method to print out the overall statistics for the day o takes two parameters-- the number of patients and the maximum score o no return value J: ided in your Workspace)
Solution
Bartleby Expert
SEE SOLUTION
Follow-up Question

Thank you. 
Can u plz provide a screenshot of the code?

 

Solution
Bartleby Expert
SEE SOLUTION
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