Question: Language is C++ ***need help due tonight at midnight!!*** A local resort hotel would like you to write a program to prepare a report on

Language is C++ ***need help due tonight at midnight!!***

 Language is C++ ***need help due tonight at midnight!!*** A local

A local resort hotel would like you to write a program to prepare a report on its guests' charges. The program should prompt the user for the guest's name, room type ('G' for garden view, 'P' for pool view, or 'L' for the lake view) and the number of days the guest will stay. The program also should prompt for whether the guest will require an extra bed in the room. Every loop (except the first) should prompt the user if they want to enter another guest. If they ('Y' for yes, 'N' for no), select 'N' it exits the loop and continues. The daily room rates are as follows: A garden view room is $125 per day; a pool view room is $145 per day; a lake view room is $180 per day. An extra bed costs $15 extra each day for a garden view room or a pool view room, but costs $20 extra each day for a lake view room. Calculate the total bill by multiplying the room rate (adjusted for an extra bed, if necessary) by the number of days the guest will stay. The program should display the guest name, room type and the total charge for the stay. The output produced should look similar to the following: CPA Resort Hotel Room Charge Guest Name Room Type Room Charge J. Doe P. Smith : Total Garden View Lake View 560.00 200.00 760.00 Code the following functions: getValidRoom Type: Will ask the user the room type. Validate to ensure only G, PorL have been entered (case insensitive). The function does not receive any parameters. It returns a valid room type. determine Rate: Will determine the room rate. Use a switch statement. Pass to the function the room type and return the daily room rate. getValidDays: Will ask the user to enter the number of days the guest will stay. Validate to ensure it is within a valid range. Make up a minimum and maximum value. Ensure your program handles an input failure. The function does not receive any parameters. It returns a valid number of days. validateReply: Validates the response to a yeso question. Use a while loop to validate. The function receives a message and returns true if they entered yes or false if they entered no. computeRoomCharge: Computes the room charge. Pass to the function only those values necessary to compute the charge. Return the room charge

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!