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

a. Write an application 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 king, or 3 for a king and a pullout couch. The output echoes the input and displays the price of the room: $125 for queen, $139 for king, and $165 for suite with king bed and a pullout couch. If the user enters an invalid code, display an appropriate message and set the price to 0. Save the file as ShadyRestRoom.java.
b. Add a prompt to the ShadyRestRoom application to ask the user to specify a (1) lake view or a (2) park view, but ask only if the bed size entry is valid. Add $15 to the price of any room with a lake view. If the view value is invalid, display an appropriate message and assume that the price is for a room with a lake view. Save the file as ShadyRestRoom2.java.

Step by Step Solution

3.44 Rating (173 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

a ShadyRestRoomjava import javautilScanner public class ShadyRestRoom public static void main String args int selection int price String result final ... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Java Programming Questions!