Question: Fast Burger Restaurant (Write a JAVA program) Fast Burger sells burger, fries and sodas. For simplicity we just call them burgers or soda and do
Fast Burger Restaurant (Write a JAVA program) Fast Burger sells burger, fries and sodas. For simplicity we just call them burgers or soda and do not categorize them further in this assignment. The restaurant sells these food items at the following prices, each burger is sold for $7, fries for $4 and sodas for $2.50 each serve. Burgers are cooked when they are ordered and take 9 minutes to prepare, up to 2 burgers can be prepared at the same time; sodas are poured instantly, and fries are also served instantly if there are any fries in the warming tray; if there are not enough fries to service an order, then they are cooked in batches of 5 serves, which takes 8 minutes. Fries can be prepared at the same time as burger + 2 minutes (to swap from prepping burger and then serving fries). If the user orders more serves of fries than what are available in the caf, a message should be displayed telling the user that the caf needs to cook some more; 5 serves will be prepared, the number of serves the user needs are provided to them, and the remained are retained for the next order. At the end of the day, the manager produces sales reports for Total sales done (in dollars), sales done per each item, i.e. and how many servings of fries remain (theyll need to be thrown out as waste). The manager can update the selling price of items at any time. Assumptions. 1. All prices as per Australian currency denominations. 2. Correct input can be assumed in this assignment. Error handling is not required in PartA.
PartA. Implement the above scenario without necessarily using object oriented design at this stage. The key focus is to use appropriate data structures and algorithm design. The suggested menu is: a) Order b) Show sales report c) Update prices d) Exit The first option Order has a sequence of actions: > Select the food item > Enter amount > Show the returned change The following is a sample interaction with the program. Text in bold are user inputs from keyboard. =============================================================== Fast Burger =============================================================== a) Order b) Show sales report c) Update prices d) Exit Please select: a > Select the food item 1. Burger 2. Fries 3. Soda 4. No more Please select: 1 How many burgers would you like to buy: 3 > Select the food item 1. Burger 2. Fries 3. Soda 4. No more Please select: 2 How many serves of fries would you like to buy: 2 Cooking fries; please be patient 3 serves of fries left for next order > Select the food item 1. Burger 2. Fries 3. Soda 4. No more Please select: 4 Total for 3 burgers and 2 fries is $29. Please enter money: 20 Sorry, thats not enough to pay for order Please enter money: 30 Change returned $1 Time taken: 18 minutes =============================================================== Fast Burger =============================================================== a) Order b) Show sales report c) Update prices d) Exit Please select: b Unsold Serves of Fries: 3 Total Sales: Burgers: 3 $21.00 Fries: 2 $8.00 Soda: 0 $0.00 5 $29.00 =============================================================== Fast Burger =============================================================== a) Order b) Show sales report c) Update prices d) Exit Please select: d Bye Bye.
PartB The aim of Part B is to introduce objects. In Part B you have to incorporate concepts of restaurant, Food items in the above scenario. The functionality of the driver (main) class would remain the same except for the addition of allowing users to order meals (see below). You have to organize the data and the functionality into required classes using object oriented concepts. For example, in an object oriented program the price information should reside in the corresponding food item object rather than the main program. The new program should have the exact same functionalities as specified in Part A except that a user can now also order a meal, which is 1 burger, 1 serve of fries and 1 soda, at a price that discounts each item in a meal by $1: add the option of buying a meal (or multiple meals) to the menu, but everything else remains the same, including reporting sales of individual items. General Requirements Use appropriate OO design concepts, e.g., polymorphism, where appropriates Your program should validate user inputs. Your programs should not crash or display unexpected data upon invalid input.
**********************(Need Part A and Part B programs separately please )***********************************




Fast Burger Restaurant Fast Burger sells burger, fries and sodas. For simplicity we just call them burgers or soda and do not categorize them further in this assignment. The restaurant sells these food items at the following prices, each burger is sold for $7, fries for $4 and sodas for $2.50 each serve. Burgers are cooked when they are ordered and take 9 minutes to prepare, up to 2 burgers can be prepared at the same time; sodas are poured instantly, and fries are also served instantly if there are any fries in the warming tray; if there are not enough fries to service an order, then they are cooked in batches of 5 serves, which takes 8 minutes. Fries can be prepared at the same time as burger + 2 minutes (to swap from prepping burger and then serving fries). If the user orders more serves of fries than what are available in the caf, a message should be displayed telling the user that the caf needs to cook some more; 5 serves will be prepared, the number of serves the user needs are provided to them, and the remained are retained for the next order. At the end of the day, the manager produces sales reports for Total sales done (in dollars), sales done per each item, i.e. and how many servings of fries remain (they'll need to be thrown out as waste) The manager can update the selling price of items at any time. Assumptions. 1. All prices as per Australian currency denominations. 2. Correct input can be assumed in this assignment. Error handling is not required in PartA. PartA. Implement the above scenario without necessarily using object oriented design at this stage. The key focus is to use appropriate data structures and algorithm design. (Note: you may skip straight to Part B and use 00 but Part A is designed to let you focus on the basic parts first.) The suggested menu is: a) Order b) Show sales report c) Update prices d) Exit The first option "Order" has a sequence of actions: > Select the food item > Enter amount > Show the returned change The following is a sample interaction with the program. Text in bold are user inputs from keyboard. Fast Burger The following is a sample interaction with the program. Text in bold are user inputs from keyboard. Fast Burger a) Order b) Show sales report c) Update prices d) Exit Please select: a > Select the food item 1. Burger 2. Fries 3. Soda 4. No more Please select: 1 How many burgers would you like to buy: 3 > Select the food item 1. Burger 2. Fries 3. Soda 4. No more Please select: 2 How many serves of fries would you like to buy: 2 Cooking fries; please be patient 3 serves of fries left for next order > Select the food item 1. Burger 2. Fries 3. Soda 4. No more Please select: 4 Total for 3 burgers and 2 fries is $29. Please enter money: 20 Sorry, that's not enough to pay for order Please enter money: 30 Change returned $1 Time taken: 18 minutes =========== Fast Burger a) Order b) Show sales report c) Update prices d) Exit Please select: b Unsold serves of Fries: 3 Total Sales: Burgers: 3 Fries: 2 Soda: 0 $21.00 $8.00 $0.00 5 $29.00 Fast Burger a) Order b) Show sales report c) Update prices d) Exit Please select: b Unsold serves of Fries: 3 Total Sales: Burgers: 3 Fries: 2 Soda: 0 $21.00 $8.00 $0.00 5 $29.00 Fast Burger a) Order b) Show sales report c) Update prices d) Exit Please select: d Bye Bye. PartB The aim of Part B is to introduce objects. In Part B you have to incorporate concepts of restaurant, Food items in the above scenario. The functionality of the driver (main) class would remain the same except for the addition of allowing users to order meals (see below). You have to organize the data and the functionality into required classes using object oriented concepts. For example, in an object oriented program the price information should reside in the corresponding food item object rather than the main program. user can The new program should have the exact ame functionalities as specified in Part A except that now also order a meal, which is 1 burger, 1 serve of fries and 1 soda, at a price that discounts each item in a meal by $1: add the option of buying a meal (or multiple meals) to the menu, but everything else remains the same, including reporting sales of individual items. General Requirements Use appropriate OO design concepts, e.g., polymorphism, where appropriates Your program should validate user inputs. Your programs should not crash or display unexpected data upon invalid input. Fast Burger Restaurant Fast Burger sells burger, fries and sodas. For simplicity we just call them burgers or soda and do not categorize them further in this assignment. The restaurant sells these food items at the following prices, each burger is sold for $7, fries for $4 and sodas for $2.50 each serve. Burgers are cooked when they are ordered and take 9 minutes to prepare, up to 2 burgers can be prepared at the same time; sodas are poured instantly, and fries are also served instantly if there are any fries in the warming tray; if there are not enough fries to service an order, then they are cooked in batches of 5 serves, which takes 8 minutes. Fries can be prepared at the same time as burger + 2 minutes (to swap from prepping burger and then serving fries). If the user orders more serves of fries than what are available in the caf, a message should be displayed telling the user that the caf needs to cook some more; 5 serves will be prepared, the number of serves the user needs are provided to them, and the remained are retained for the next order. At the end of the day, the manager produces sales reports for Total sales done (in dollars), sales done per each item, i.e. and how many servings of fries remain (they'll need to be thrown out as waste) The manager can update the selling price of items at any time. Assumptions. 1. All prices as per Australian currency denominations. 2. Correct input can be assumed in this assignment. Error handling is not required in PartA. PartA. Implement the above scenario without necessarily using object oriented design at this stage. The key focus is to use appropriate data structures and algorithm design. (Note: you may skip straight to Part B and use 00 but Part A is designed to let you focus on the basic parts first.) The suggested menu is: a) Order b) Show sales report c) Update prices d) Exit The first option "Order" has a sequence of actions: > Select the food item > Enter amount > Show the returned change The following is a sample interaction with the program. Text in bold are user inputs from keyboard. Fast Burger The following is a sample interaction with the program. Text in bold are user inputs from keyboard. Fast Burger a) Order b) Show sales report c) Update prices d) Exit Please select: a > Select the food item 1. Burger 2. Fries 3. Soda 4. No more Please select: 1 How many burgers would you like to buy: 3 > Select the food item 1. Burger 2. Fries 3. Soda 4. No more Please select: 2 How many serves of fries would you like to buy: 2 Cooking fries; please be patient 3 serves of fries left for next order > Select the food item 1. Burger 2. Fries 3. Soda 4. No more Please select: 4 Total for 3 burgers and 2 fries is $29. Please enter money: 20 Sorry, that's not enough to pay for order Please enter money: 30 Change returned $1 Time taken: 18 minutes =========== Fast Burger a) Order b) Show sales report c) Update prices d) Exit Please select: b Unsold serves of Fries: 3 Total Sales: Burgers: 3 Fries: 2 Soda: 0 $21.00 $8.00 $0.00 5 $29.00 Fast Burger a) Order b) Show sales report c) Update prices d) Exit Please select: b Unsold serves of Fries: 3 Total Sales: Burgers: 3 Fries: 2 Soda: 0 $21.00 $8.00 $0.00 5 $29.00 Fast Burger a) Order b) Show sales report c) Update prices d) Exit Please select: d Bye Bye. PartB The aim of Part B is to introduce objects. In Part B you have to incorporate concepts of restaurant, Food items in the above scenario. The functionality of the driver (main) class would remain the same except for the addition of allowing users to order meals (see below). You have to organize the data and the functionality into required classes using object oriented concepts. For example, in an object oriented program the price information should reside in the corresponding food item object rather than the main program. user can The new program should have the exact ame functionalities as specified in Part A except that now also order a meal, which is 1 burger, 1 serve of fries and 1 soda, at a price that discounts each item in a meal by $1: add the option of buying a meal (or multiple meals) to the menu, but everything else remains the same, including reporting sales of individual items. General Requirements Use appropriate OO design concepts, e.g., polymorphism, where appropriates Your program should validate user inputs. Your programs should not crash or display unexpected data upon invalid input
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
