Description
You have been asked to develop a program for Yoshi’s Pizza restaurant. The program will calculate and display the cost of a customer’s order including GST and deposit (where applicable). Each customer may order any number of each type of food and beverage (pizza, side, or cola). The restaurant needs to track and display the total revenue for the day, the total of each type of sale (pizza, side, or cola), and the total number of customers for the day.
Additional Program Requirements:
- Declare and use constants for the each of the costs of the different items being sold (e.g. COST_PIZZA_SM=12.75, COST_PIZZA_LG=18.75, etc.), GST and deposit prices. (No magic numbers!)
- Use a character data type for the type of purchase being made, i.e. the type value will be one of p, P, s, S, d or D.
- Use a switch to respond appropriately to type of purchase being made (pizza, side or drinks)
- Use if statements within certain switch cases for additional required branching. Within the if statements, use an appropriate data type for the purchase being made, for example if the customer is buying a small pizza, then you can use the value ‘s’.
- You need to check if the customer’s order is complete or if you are still calculating the current customer’s order (see sample program output).
- Your program will continue until the order details for the final customer of the day have been calculated. Use a sentinel-controlled-loop — stopping when the user enters “x” or “X” (for Exit).
- All cost values must be printed out to only two decimal places.
- It is NOT necessary to use the “rounded cents” technique for your cost calculations.
- You are NOT expected to check for invalid input values.
Cost Calculation Rules:
- Use the following rules when computing your cost calculations:
- 6-pack cola incurs a deposit of $0.10 per can in the case, i.e. a 6-pack has an added deposit cost of $0.60.
- Add deposit charges before calculating GST.
Madison Hayes –
I am going to school for computer engineering and since the COVID-19 I have had a lot of difficulty learning and solving the problems that our teachers gave to us. I tried to get some help from friends but still useless. Then I found that Gotit Pro helps you to solve every question that you have in a very high quality and explaining everything that you need. Since then my marks have been very high and I am very happy now. I have been using it for 4 months and I will keep using it every time. Thank you