The name of the submitted program must be hotelPolicy.cpp Write C++ program of the pseudocode developed...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
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 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
Expert Answer:
Answer rating: 100% (QA)
Here is a simple C program named hotelPolicycpp based on the given pseudocode include include using ... View the full answer
Related Book For
Income Tax Fundamentals 2013
ISBN: 9781285586618
31st Edition
Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill
Posted Date:
Students also viewed these programming questions
-
Planning is one of the most important management functions in any business. A front office managers first step in planning should involve determine the departments goals. Planning also includes...
-
Managing Scope Changes Case Study Scope changes on a project can occur regardless of how well the project is planned or executed. Scope changes can be the result of something that was omitted during...
-
Fill in the Blanks The giant tubeworms found in the hydrothermal vents are called lack both a gut and a mouth. Instead, they have an organ called a (types of elements, e.g. potassium, sulfur,...
-
In Exercises 1-4, find the center, foci, and vertices of the ellipse. Then sketch the ellipse 1. (x - 1)2 / 9 + (y - 5)2 / 25 = 1 2. (x - 6)2 / 4 + (y + 7)2 / 16 = 1 3. (x + 2)2 + (y + 4)2 / 1/4 = 1...
-
The reaction to prepare methanol from carbon monoxide and hydrogen is exothermic. If you wanted to use this reaction to produce methanol commercially, would high or low temperatures favor a maximum...
-
Cottle Ltd uses a sales journal, a cash receipts journal, a general journal and an accounts receivable subsidiary ledger within a periodic inventory system. The terms of all credit sales are 2/10,...
-
Use the appropriate items from the following list to prepare in good form Owen Davis Companys balance sheet at December 31,2012. Value ($000) at December 31, 2012 Value ($000) at December 31, 2012...
-
1. A scientific committee is to be formed form 6 Indians and 8 foreigners, which includes at least 2 Indians and double the number of foreigners as Indians. Then the number of ways the committee and...
-
Tonys Precision Computer Centre is picking up in business, so he has decided to expand his bookkeeping system to a general journal/ledger system. The balances from June have been forwarded to the...
-
Ashok was issued 300 shares of Rs.10 each issued at a discount of 10%. He paid Rs.2 on application and failed to pay allotment money Rs.3. Subsequently his shares were forfeited. The accounting entry...
-
You have a product that costs $100.00 to produce, and sells for $200.00. You sell 6 of these products as a result of advertising them on TV. Your total sales are $1,200.00, and your TV ad costs...
-
Why does business continuity require the largest budget expenditure in contingency planning operations? Discuss the types of expenses involved in maintaining service level agreements for hot sites.
-
A Canadian travel agent is paid a flat rate of $ 3 7 . 5 0 for every vacation booked through a certain airline. If the vacation is in North America, the agent also receives a commission of 2 . 4 5 %...
-
On 1/1/2022, Illini issued its inventory as dividends to its shareholders. The book value of the inventory at the time was $10,000, and the inventory could be sold on the market at $60,000. What is...
-
In 2023, Savannah ($55,000 AGI) contributes stock to her church. The stock, bought seven years ago for $24,000, is currently worth $26,000. Savannah's 2023 marginal federal tax rate is 32 percent,...
-
Which one of the following is a primary market transaction? O a. Sale of a new share of stock to an individual investor O b. Investor A sells her stock to investor B Gift of stock from one...
-
The area of a rectangle is 30 cm 2 and its perimeter is 26 cm. Find the length and width of the rectangle.
-
How are qualified dividends taxed in 2012? Please give the two rates of tax which apply to qualified dividends, and specify when each of these rates applies._________________________...
-
Mallory Corporation has a calendar year-end. The corporation has paid estimated payments of $10,000 during 2012 but still owes an additional $5,000 for its 2012 tax year. a. When is the 2012 tax...
-
Mary paid $2,000 of state income taxes in 2012. The total sales tax she paid during 2012 was $5,500, which included $3,000 for the cost of a new car. How should Mary treat the taxes paid on her 2012...
-
When would you prefer to use busy-wait I/O over interrupt-driven I/O?
-
Draw UML diagrams for the read of one character from an 8251 UART. To read the character from the UART, the device needs to read from the data register and to set the serial port status register bit...
-
Draw a UML state diagram for software processing of a vectored interrupt. The vector handling is performed by software (a generic driver) that executes as the result of an interrupt. Assume that the...
Study smarter with the SolutionInn App