Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Take 3 products: 1- Chicken Burger for Rs.200 2- Zinger Burger for Rs.350 3- Chicken Shawarma for Rs.60 Write a java code for online food

Take 3 products:

1- Chicken Burger for Rs.200

2- Zinger Burger for Rs.350

3- Chicken Shawarma for Rs.60

image text in transcribedimage text in transcribed

Write a java code for online food delivery system to manage the data of customers who order the food using online application. User have different option for the payment i.e. Credit Card, Debit Card and Cash on Delivery. Credit card user get 10% discount on total bill, debit card customers get 7% discount while cash on delivery customers get 5% discount. Other than food bill each user have to pay delivery charges RS. 100/-. Carefully think about number of classes and attribute for each class. All attributes of classes must be private and exposed via getter and setter. For all classes, create fully parameterized constructor. Write a test class named TerminalTest. In test class, show a menu to user to input data of customers, as well as food items. To input data you have to create static methods. Create another static method to order food items and calculate bill. Input data will be stored in database. Your program should handle all checked exceptions. Once data is saved in database, show the following menu to user: 1. Enter 1 to display data of all food items with price 2. Enter 2 to display data of all customers who order the food 3. Enter 3 to display total bill of credit card customers 4. Enter 4 to display total bill of debit card customers 5. Enter 5 to display total bill of cash on delivery customers Write a java code for online food delivery system to manage the data of customers who order the food using online application. User have different option for the payment i.e. Credit Card, Debit Card and Cash on Delivery. Credit card user get 10% discount on total bill, debit card customers get 7% discount while cash on delivery customers get 5% discount. Other than food bill each user have to pay delivery charges RS. 100/-. Carefully think about number of classes and attribute for each class. All attributes of classes must be private and exposed via getter and setter. For all classes, create fully parameterized constructor. Write a test class named TerminalTest. In test class, show a menu to user to input data of customers, as well as food items. To input data you have to create static methods. Create another static method to order food items and calculate bill. Input data will be stored in database. Your program should handle all checked exceptions. Once data is saved in database, show the following menu to user: 1. Enter 1 to display data of all food items with price 2. Enter 2 to display data of all customers who order the food 3. Enter 3 to display total bill of credit card customers 4. Enter 4 to display total bill of debit card customers 5. Enter 5 to display total bill of cash on delivery customers

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Pro PowerShell For Database Developers

Authors: Bryan P Cafferky

1st Edition

1484205413, 9781484205419

More Books

Students also viewed these Databases questions

Question

Describe and debunk three common myths about leadership.

Answered: 1 week ago

Question

LO6Outline steps for creating a performance improvement plan.

Answered: 1 week ago