Question: write a C++ program to produce customers' bills. The program should read in the following data. May use a function to do this. The number
write a C++ program to produce customers' bills. The program should read in the following data. May use a function to do this.
- The number of adults to be served.
- The number of children to be served.
- A choice of an adult meal: the whole party will be served either standard or deluxe meal, Defined as constants and selected from a menu. May use a sub-function to do this.
- Cost for Deluxe meal $25.95
- Cost for Standard meal 21.75.
- A choice of the hall (no hall fee, if catered at the person's home). Defined as constants and selected from a menu. May use a sub-function do this.
- Hall - A $100.00
- Hall - B $85.00
- Hall - C $75.00
- Hall - D $65.00
- Hall - H is home
- A 10% surcharge will be added to the bill if the catering is done on a weekend.
- Speedy discount: to induce customers to pay promptly, a discount is offered if payment is made within 10 days, the discount depends on the total bill. Discount is defined as constants. You may use a function to do this.
- bill < $500.00 the discount is 1%
- $500.00 - $999.00 the discount is 2%
- $1000.00 - $4999.00 the discount is 4%
- $5000.00 - $9999.00 the discount is 5%
- bill > $10000.00 the discount is 7%
Calculations:
- The cost per child's meal is (60% of the cost of the adult's meal).
- A 20 % for gratuity (applied only to the cost of food.)
- A 7.0% sales tax applied to the subtotal of the bill excluding gratuity
* Main is a driver function, should not have any IPO statements, just function calls.
*No global declarations
Caswell Catering and Convention Services
Final Bill
/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/
Number of adult: 80
Number of children: 6
Gratuity: 20%
Weekend: Yes
Cost per standard meal for adult: $21.75
Cost per standard meal for child: $13.05
-------------------------------------------------------------------
Total cost for adult meals: $1740.00
Total cost for child meals: $78.30
Total food cost: $1818.30
-------------------------------------------------------------------
Gratuity: $363.66
Hall C - Room fee $75.00
Weekend charge: $225.70
Taxes: $127.28
-------------------------------------------------------------------
Subtotal: $2609.94
Less Speedy Payment $105.66
Balance due: $2104.28
/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
