Question: A small hotel has Studio ( 1 ) , Moderate ( 2 ) , Luxe ( 3 ) , Deluxe ( 4 ) & Suite

A small hotel has Studio (1), Moderate (2), Luxe (3), Deluxe (4) & Suite (5) types of rooms.
The daily room rates including tax for these room types are: $75, $100, $150, $300 and $500 respectively. Declare these rates as a global constant of type currency.
In addition, the hotel charges, 9.25% tax to the total cost. Declare this as a global constant of type double.
According to the hotel policy, Studio type isn't offered if the guest is to stay for more than 2 nights. If the guest chooses Studio type and wants to stay more than 2 nights, then the room is upgraded automatically to Moderate type, and the guest is informed about the rule and charged accordingly.
The hotel manager wants you to develop a macro to calculate the total room charge for its guests.
1) the macro should prompt the user for the room type (declare a variable of type integer).
Use an appropriate prompt so that the user knows what to do, i.e. Enter 1 for Studio, etc... If the user inputs a # for the room type that does not match one of the types available (i.e.<1 OR >5) then the program exists with an error message that indicates the incorrect data entry.
2) the macro should prompt the user for the number of days the guest will stay. Use an appropriate prompt so that the user knows what to do.
3) the macro should ask the user % gratitude (tip) to be applied to the total charge.
4) based on the user's input for the room type (either 1 for Studio, 2 for Moderate, 3 for Luxe, 4 for Deluxe & 5 for Suite), the macro should then choose the appropriate daily room rate for the room type preferred. Then, use this daily room rate together with the number of days the guest will stay and the tip to calculate the total room charge. Make sure to display a message to let the guest know that the room is upgraded to Moderate (2), if the room type is 2(i.e. Studio) and # of stays >2.
Finally, the macro should display the room type, daily rate, the number of days of the stay, and the total room charge (in which the tip is included) for the stay.
Test your macro using various input to make sure its running as intended. For example:
if the user runs the macro and enters 1 for the room type and 3 for the number of days the guest will stay, the user should see the following message:
Studio type isn't available for more than 2 nights. You're upgraded to a Moderate option.
Room type: Moderate. Daily rate: $100.00. Number of days: 3. Total charge: $330.00
Note that the charge includes the 10% tip.
if the user runs the macro and enters 4 for the room type and 4 for the number of days the guest will stay, the user should see the following message:
Room type: Deluxe. Daily rate: $300.00. Number of days: 4. Total charge: $1440.00
Note that the charge includes the 20% tip
Submit only one module (rename your module as RoomCharge) with the macro in (name your macro as Charge).
Add a textbox, with a note to the user as Press here to run the macro, in a sheet to run the macro to calculate the total cost of stay. Format your textbook with any color of solid fill.
Make sure save your workbook as macro enabled, so you dont lose your program.

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 Programming Questions!