Question: Write a program that calculates the total charges for booking rooms at a hotel. The hotel charges different prices for a room depending on the

Write a program that calculates the total charges for booking rooms at a hotel. The hotel charges different prices for a room depending on the type of room, the number of people and the number of days according to the following policy:
For a regular room: the basic charge for up to two travelers is $180 per day. Every additional person is $35 per person per day.
For a deluxe room: the basic charge for up to two travelers is $280 per day. Every additional person is $45 per person per day.
For example, the charge for a regular room for 3 people for 2 days will be $180*2 for the first two travelers and $35*2 for the third traveler, giving total of $430. The charge for a deluxe room for a single person for a single day will be $280. See sample run below.
Specifically, write a program that
Welcomes the user to the Bellevue Inn.
Asks the user for
the type of the room (**ASSUME USER ENTERS VALID INPUT: R, r, D or d ***)
the number of travelers (**ASSUMER USER ENTERS A POSITIVE INTEGER**)
the number of days (**ASSUMER USER ENTERS A POSITIVE INTEGER**)
(No need to validate inputs)
Prints the charge for that room and the total charge so far.
Prompts the user if she wants to continue with more input.
If user enters y or Y, repeats steps 2-4 again, otherwise, ends the program by printing the final total charge and prints Bye.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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 Databases Questions!