Answered step by step
Verified Expert Solution
Question
1 Approved Answer
10% off YUMMY Cafe is a western cafe that offers variety of western food for its customers. The following table depicts the products available for
10% off YUMMY Cafe is a western cafe that offers variety of western food for its customers. The following table depicts the products available for this cafe. Price per item Product Menu (RM) Code Adult Senior Children (7 Children Citizen 12 years old) (Below 7 years old) 1 Lamb Grill 18.50 20% off 10% off Free 2 Beef Grill 16.00 20% off Free 3 Chicken Grill 13.50 20% off 10% off Free 4 Meatball Bolognese 10.50 20% off 10% off Free Write a complete C++ program that can perform the following tasks: a) Display the above menu to the user. b) Prompt the user to enter the following data: the customer name customer's contact number the number of adults and senior citizen the number of children the product code the quantity of food c) Customers can continue to enter the product code and the quantity of food as many times as they wish and will terminate when they request to stop the process. d) Display an error message if the user enters invalid input. e) Calculate the total amount that the customer must pay. Consider the following cases into the calculation: A senior citizen gets a 20% off the menu's price. ii. Children aged 7 until 12 years old get a 10% off the menu's price while children who are less than 7 years old can eat for free. i. iii. iv. The total amount should include 6% of government tax. A 10% dollar-off discount is given to any amount payment that exceeds RM 500 in a single receipt. A 5% group discount is given if there are at least 10 people eating in a single receipt. V. f) Generate a receipt for each customer using the format as shown in Figure 1. g) The user is then asked whether to proceed with the next customer or not. If he chooses to proceed, then the program starts a new data entry from the beginning. On the other hand, if the user chooses to stop, then the program will display the total sales for YUMMY Caf on that day, as shown in Figure 2. WELCOME TO YUMMY CAF Customer Name: SAM SMITH Contact No.: 013-4457876 Your Order Details Menu: Lamb Grill Qty: Meatball Bolognese Qty: 2 2 Number of Adults: Number of Senior Citizen: Number of children (7-12 years) 2 0 o Total Price : RM 58.00 Plus 6% govt. tax : RM 61.48 Deductibles: 10% dollar-off discount : RM O 5% group discount: RM O GRAND TOTAL: RM 61.48 Thank you. Please Come Again. Figure 1: A receipt generated for a customer YUMMY CAF 12 November 2021, 6.10 pm TOTAL SALES TODAY: RM 5400.00 Figure 2: Display of total sales
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started