Question: A small hotel has Studio ( 1 ) , Moderate ( 2 ) , Luxe ( 3 ) , Deluxe ( 4 ) & Suite
A small hotel has Studio Moderate Luxe Deluxe & Suite types of rooms.
The daily room rates including tax for these room types are: $ $ $ $ and $ respectively. Declare these rates as a global constant of type currency.
In addition, the hotel charges, 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 nights. If the guest chooses Studio type and wants to stay more than 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.
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 ie Enter for Studio, etc... If the user inputs a # for the room type that does not match one of the types available ie OR then the program exists with an error message that indicates the incorrect data entry.
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
the macro should ask the user gratitude tip to be applied to the total charge.
based on the user's input for the room type either for Studio, for Moderate, for Luxe, for Deluxe & 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 if the room type is ie Studio and # of stays
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 for the room type and for the number of days the guest will stay, the user should see the following message:
Studio type isn't available for more than nights. You're upgraded to a Moderate option.
Room type: Moderate. Daily rate: $ Number of days: Total charge: $
Note that the charge includes the tip.
if the user runs the macro and enters for the room type and for the number of days the guest will stay, the user should see the following message:
Room type: Deluxe. Daily rate: $ Number of days: Total charge: $
Note that the charge includes the 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
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
