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).

Yoshi Pizza Restaurant Java Assignment | Complete Solution

Assignment: 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:

  1. 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!)
  2. 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.
  3. Use a switch to respond appropriately to type of purchase being made (pizza, side or drinks)
  4. 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’.
  5. 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).
  6. 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).
  7.  All cost values must be printed out to only two decimal places.
  8. It is NOT necessary to use the “rounded cents” technique for your cost calculations.
  9. 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.
  Solved by verified study co-pilot   All Study Co-Pilots are evaluated by Gotit Pro as an expert in their subject area.
Student review: (15 ratings) 15 out of 15 people found this solution helpful.