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

Programming with Microsoft Visual Basic 2017
8th Edition
ISBN:9781337102124
Author:Diane Zak
Publisher:Diane Zak
Chapter7: String Manipulation
Section: Chapter Questions
Problem 16E
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
Programming with Microsoft Visual Basic 2017
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning
Np Ms Office 365/Excel 2016 I Ntermed
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:
9781337508841
Author:
Carey
Publisher:
Cengage
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
Computer Science
ISBN:
9780357392676
Author:
FREUND, Steven
Publisher:
CENGAGE L