Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Question 1 You are hired by Lily Bakery to develop a program to calculate the payment for the cakes bought by its customers. The program
Question 1 You are hired by Lily Bakery to develop a program to calculate the payment for the cakes bought by its customers. The program should display the available cakes. Then the user will choose the preferred cake and determine its quantity. Then, the program will ask whether the user wants to add another order or not. If the user wants to add order, the available cakes will be displayed again. This will be repeated until the user finishes ordering. Meanwhile, each time the user orders, the program should total up the total price that need to be paid. At the end, the total price will be displayed and the amount tendered will be asked. Next, the program should calculate the balance and display the bill as in the sample run. The price of the cakes are as follows: New York Cheese: RM50.00, Black Forest Cheese: RM80.00 and Oreo Cheese: RM90.00. Hint: use do..while loop. Sample run: WELCOME TO LILY BANERY *********** Please choose your preferred cake: A - New York Cheese 3 - Black Forest Cheese C - Oreo Cheese Enter your choice of cake: A Enter the quantity of New York Cheese : 2 Do you want to add your order?! 'Y' / Total price : RM 100.00 Please enter amount tendered: RM 100 Your Transaction: Total price jugant Tendered Balance EN 100.00 BM 100.00 RM 0.00 SSSSSSSSS--THANK YOU PLEASE COME AGAIN!!! ************* WELCOME TO LILY BAKERY Please choose your preferred cake: A - New York Cheese B - Black Forest Cheese C - Oreo Cheese Enter your choice of cake: Enter the quantity of New York Cheese : 2 Do you want to add your order?: 'Y' / 'N': Y WELCOME TO LILY BAKERY Please choose your preferred cake: A - New York Cheese B - Black Forest Cheese C- Oreo Cheese Enter your choice of cake: C Enter the quantity of Oreo Cheese Do you want to add your order?: 'Y' / 'N' : N Total price : RM 190.00 Please enter amount tendered: RM 200 Your Transaction: Total price Amount Tendered Balance RM190.00 RM 200.00 10.00 RM $SSS SSSS--THANK YOU & PLEASE COME AGAIN!!!--SSSS
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