Question: This program is a java program where the main point is to build a little on-line food shop. Try to use methods to complete functions.

This program is a java program where the main point is to build a little on-line food shop. Try to use methods to complete functions.

Program requirements: A food market store invites you to help them build an on-line food order program. Customers can use this program to order food on-line.

The program should include at least 4 functionalities: 1) Add food in order; 2)Remove food from order; 3) Review order; 4) Check out the order. You can use a menu as a UI (user interface).

Assume there are 4 types of food: Hamburger ($8), Lemonade ($3), Chicken Wing ($1), and Pizza ($6). Customer can order any kinds of food, and any amount of them.

Scenario 1: Costumer A ordered 3 Hamburger and 2 Lemonade, and then removed 1 Hamburger and ordered 5 Chicken wings. Check them out finally.

Scenario 2: Costumer B ordered 10 chicken wings and 1 pizza, and then he reviewed his order,

and then add 1 more pizza. Check them out finally.

i) In the add food in order module, your program may need a menu too to show all sorts of food and their price. The input should be food ID and amount. Your program should record the information to calculate the total fee.

ii) In the review order module, all kinds of food information the customer ordered will be shown. The information includes unit price, amount, subtotal fee, and total fee.

iii) In the remove food from order module, customer can remove food from order. The input should be the food ID and amount. Your program should record the changed information.

iv) In the checking out module, the program will print out the bill (review information and tax fee and checkout fee). Checkout fee= total + tax. Taxfee = total * 7.77%. Taxrate: 7.77%. In addition, you can add other modules, such as customer login module, food delivery module, etc.

Output looks like the following:

This program is a java program where the main point is to

build a little on-line food shop. Try to use methods to complete

This output is just an example. You may make it better.

Hint: You may need to declare several global variables to contain customer's order information, like the quantity of any food, the prices, and so on, so that your methods can use them directly. Or the methods pass the data to each other by parameters and returning data.

Hint: You may need the following methods to be created: functionMenu(), foodMenu(), add FoodToOrder(), removeFoodFromOrder(), reviewOrder(), and checkout().

Hint:In the main method, you may need a

sentinel control led loop to control the whole process.

Hint: Think about the situations that the customers mayinput a wrong characterumber.

Click Comn featur D: \NetBeansProjects\demo\build\classes>java OnlineFoodsoE Wel come to Mcdonald's store!! Pleae choose one option (O - Quit): 1. Add food to order 2. Remove food from order 3. Review the order 4. Check out the order. Pleae choose one food (0->back to function menu): ID Food name Price 1. Hamburger 2. Lemonade 3. Chicken Wing $1 $3 $5 P1zza Hamburger (quantity): 2 Pleae choose one food (back to function menu) ID Food name Price 1. Hamburger$8 2. Lemonade 3. chicken Wing $1 Pizza Lemonade (quantity): 1 Pleae choose one food (0> back to function menu): ID Food name Price 1. Hamburger$8 2. Lemonade 3. Chicken Wing $1 4. Pizza 0 Pleae choose one option (O - Quit): 1. Add food to order 2. Remove food from order 3. Review the order; 4. Check out the order

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!