Question
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
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:
- Enter 1 to display data of all food items with price
- Enter 2 to display data of all customers who order the food
- Enter 3 to display total bill of credit card customers
- Enter 4 to display total bill of debit card customers
- Enter 5 to display total bill of cash on delivery customers
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started