Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Create a project called Lab4. Create a class in this project called DoctorVisit. Be sure to check the box to include a main method for

image text in transcribed
Create a project called "Lab4". Create a class in this project called "DoctorVisit". Be sure to check the box to include a main method for your class. Implement the main method as follows: a. Print a brief message welcoming the patient to the doctor's office. b. Print a message that says, "Which body part(s) are you having trouble with?" After that, display individual prompts like these: i. Head (Y/N)? ii. Neck (Y/N)? iii. Torso (Y/N)? iv. Leg (Y/N)? v. Foot (Y/N)? Use the Scanner to read the user's response to each of the above questions. c. If the user said "Y" for NONE of the options, print a message telling them that they are fine and that they should just go home! (There should be no further output in this case.) d. If the user said "Y" to MORE THAN 2 options, print a message telling them that they are seriously ill and need to go straight to the emergency room! (There should be no further output in this case.) e. If the user said "Y" to "Head" but nothing else, print a message telling them that they need to go to a psychiatrist. (There should be no further output in this case.) f. If the user said "Y" to "Head" and also to one other body part, then print a message like this: "Your foot problem is all in your head. Try not to think about it." (Of course, "foot" should be whichever body part they said was bothering them, other than head.) g. In any other case, for each body part that they complained about (there should be either one or two), print message(s) like those below. For example, if they complained about the Torso and Foot, then you should print the second and fourth messages from the list below. i. Neck injuries are serious. Lets lighten the mood with a joke. (Then tell a joke). ii. Torso injuries are no big deal. Suck it up buttercup. iii. Your leg hurts? It's probably broken. Take an aspirin. iv. Try walking on the other foot

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

=+ Why have these changes occurred?

Answered: 1 week ago

Question

=+90 percent of all oil refineries) into several smaller companies

Answered: 1 week ago