Hello! We value you and your time, so we will help you prioritize which patients to see next! Please answer the following questions about the next patient so we can help you do your best work :) Please enter the next patient's name or "quit" to end the program. Patient's name: Issa Patient age: 14 Patient zip code: 998 Invalid zip code, enter valid zip code: 1 Invalid zip code, enter valid zip code: 715498 Invalid zip code, enter valid zip code: 66548 Is our hospital "in network" for the patient's insurance? no Patient pain level (1-10): -8 Invalid pain level, enter valid pain level (1-10): 22 Invalid pain level, enter valid pain level (1-10): 0 I Invalid pain level, enter valid pain level (1-10): 3 Patient temperature (in degrees Fahrenheit): 97.9

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

Look at the image for the expected output. Use if class, scanner class, return class to do this program.

Look image for the valid user input.

 

Hello! We value you and your time, so we will help
you prioritize which patients to see next!
Please answer the following questions about the next patient so
we can help you do your best work :)
Please enter the next patient's name or "quit" to end the program.
Patient's name: Issa
Patient age: 14
Patient zip code: 998
Invalid zip code, enter valid zip code: 1
Invalid zip code, enter valid zip code: 715498
Invalid zip code, enter valid zip code: 66548
Is our hospital "in network" for the patient's insurance? no
Patient pain level (1-10): -8
Invalid pain level, enter valid pain level (1-10): 22
Invalid pain level, enter valid pain level (1-10): 0 I
Invalid pain level, enter valid pain level (1-10): 3
Patient temperature (in degrees Fahrenheit): 97.9
Transcribed Image Text:Hello! We value you and your time, so we will help you prioritize which patients to see next! Please answer the following questions about the next patient so we can help you do your best work :) Please enter the next patient's name or "quit" to end the program. Patient's name: Issa Patient age: 14 Patient zip code: 998 Invalid zip code, enter valid zip code: 1 Invalid zip code, enter valid zip code: 715498 Invalid zip code, enter valid zip code: 66548 Is our hospital "in network" for the patient's insurance? no Patient pain level (1-10): -8 Invalid pain level, enter valid pain level (1-10): 22 Invalid pain level, enter valid pain level (1-10): 0 I Invalid pain level, enter valid pain level (1-10): 3 Patient temperature (in degrees Fahrenheit): 97.9
You may assume that the user enters reasonable or "valid" responses when prompted for each piece of
information, with two exceptions:
• You should verify that the user enters a 5-digit integer when prompted for the patient's zip code. The
formula for calculating the patient score relies on the first and second digits of the zip code, so we need to
make sure that the user enters a valid zip code to factor it into the formula appropriately.
• You should verify that the user enters an integer in the range 1-10 (inclusive) when prompted for the
patient's pain level. The pain level of the patient directly affects the calculated priority score, so you should
ensure the entered pain level is within the appropriate range.
If the user enters an invalid zip code, you should reprompt the user with the message "Invalid zip-code, enter
valid zip-code: " until they enter a valid zip code. Similarly, if the user enters an invalid pain level, you should
" until they
reprompt the user with the message "Invalid pain level, enter valid pain level (1-10): "
enter a valid pain level. For example:
Transcribed Image Text:You may assume that the user enters reasonable or "valid" responses when prompted for each piece of information, with two exceptions: • You should verify that the user enters a 5-digit integer when prompted for the patient's zip code. The formula for calculating the patient score relies on the first and second digits of the zip code, so we need to make sure that the user enters a valid zip code to factor it into the formula appropriately. • You should verify that the user enters an integer in the range 1-10 (inclusive) when prompted for the patient's pain level. The pain level of the patient directly affects the calculated priority score, so you should ensure the entered pain level is within the appropriate range. If the user enters an invalid zip code, you should reprompt the user with the message "Invalid zip-code, enter valid zip-code: " until they enter a valid zip code. Similarly, if the user enters an invalid pain level, you should " until they reprompt the user with the message "Invalid pain level, enter valid pain level (1-10): " enter a valid pain level. For example:
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 2 images

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

Thank you so much. But can you separate it to three methods?  (Look the image for requirements)

1. A method to print the program's introduction message
o no parameters
o no return value
2. A method to get a patient's name through user input
o takes one Scanner parameter
o returns the name read from input
3. A method to collect the required patient information (age, zip code, insurance information, pain level, and
temperature) and compute the priority score
o takes one Scanner parameter
o returns the computed score
Transcribed Image Text:1. A method to print the program's introduction message o no parameters o no return value 2. A method to get a patient's name through user input o takes one Scanner parameter o returns the name read from input 3. A method to collect the required patient information (age, zip code, insurance information, pain level, and temperature) and compute the priority score o takes one Scanner parameter o returns the computed score
Solution
Bartleby Expert
SEE SOLUTION
Knowledge Booster
Mathematical functions
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
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education