Question: The name of the submitted program must be hotelPolicy.cpp Write C++ program of the pseudocode developed in Assignment 2 (Problem 3) Hotel Pricing Policy
The name of the submitted program must be hotelPolicy.cpp Write C++ program of the pseudocode developed in Assignment 2 (Problem 3) Hotel Pricing Policy (Please utilize the pseudocode or flowcharts of Assignment 2 for this problem). Problem description is given below: A hotel has a pricing policy as follows: Policy A: 2 people - $60 Policy B: 3 people - $75 Policy C: 4 people - $90 Policy D: Additional people - $8 per person If the customer is staying on company business, there is a 10% discount. If the customer is over 65 years of age, there is a 15% discount. A customer does not receive both discounts. Write a C++ program that calculates the cost of the room. It should ask which policy the customer want to purchase and if any discount included with the policy. It should then display the cost of the room. Input Validation: Be sure the user only selects package A, B, C or D. Exit the program if user enters incorrect information. NOTE: Use valid and meaningful variable names or identifiers. Include proper comments in your program. Some Programming Hints: 1. Use cout to display the result or output on the screen. 2. Use cin to get the input from the user. Sample Run 1 Which policy did the customer purchase? (Pick A, B, C or D): EJ Incorrect Policy. Activat Go to Set Sample Run 2 Which policy did the customer purchase? (Pick A, B, C or D): A J Is the customer over 65 years of age? (Y or N):N J Is the customer over 65 years of age? (Y or N) :Y J Cost of the room is: $54.00 Sample Run 3 Which policy did the customer purchase? (Pick A, B, C or D): DJ How many additional People? 2 J Is the customer over 65 years of age? (Y or N): Y J Cost of the room is: $90.1
Step by Step Solution
3.36 Rating (152 Votes )
There are 3 Steps involved in it
Here is a simple C program named hotelPolicycpp based on the given pseudocode include include using ... View full answer
Get step-by-step solutions from verified subject matter experts
