Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

PartA Write an application called ShadyRestRoom for the Shady Rest Hotel; the program determines the price of a room. Ask the user to choose 1

PartA
Write an application called ShadyRestRoom for the Shady Rest Hotel; the program determines the price of a room. Ask the user to choose 1 for a queen bed, 2 for a ling, or 3 for a ling and a pullout couch. The output echoes the input and displays the price of the room: $123 for queen, S139 for ling, and Sles for a sulte with a king bed and a pullout couch. If the user enters an invalid code, display an appropriate message and set the price to o.
An example of the program is shown below:
Menu
(1) Queen bed
(2) King bed
(3) Suite with a king bed and pull-out couch(3) Suite with a king bed and pull-out couch
Enter Selection (1,2, or 3)2
You selected King bed $139
Part 3
Copy the contents of the ShadyRestRoom application into ShodyRestRoom2jovo file anc rename the class ShadyRestRoom?. Add a prompt to the ShadyRestRoom application to ask the user to specify a (a) lalse viow or a (2) park viow, but ask that question only if th bed size entry is valid. Add $15 to the price of any room with a lake vier. If the view valu is invalid, display an appropriate message and assume that the price is for a room with lake viem.
An example of the program is shown below:
MenuMenu
(1) Queen bed
(2) King bed
(3) Suite with a king bed and pull-out couch
Enter Selection (1,2, or 3)2
Please choose a view:
(1) a lake
(2) a park
Enter Selection (1 or 2)1
You selected King bed with a lake view for $154Task o1: Create the ShadyRestRoom class.
Task 02: The program ShadyRestRoom accepts the user selection for a room and displays the price of the room.
Task 0s: The ShadyRestRoom program handles an invalid room selection.Task oas Greate the ShadyRestRoom2 class.
Task 038 The program ShadyRestioom? accepts the user selection for a room and displays the price of the room.
Trosucs The ShadyiestRoom? program handles an invalid room selection.
image text in transcribed

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_step_2

Step: 3

blur-text-image_step3

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

=+14.4. 1 Let C be the set of continuity points of F.

Answered: 1 week ago