Question: Can you write an ordering program like in the picture in java using Proper class hierarchy (inheritance, interfaces) and exception handling(e.g. invalid id or quantity)?

 Can you write an ordering program like in the picture in

Can you write an ordering program like in the picture in java using Proper class hierarchy (inheritance, interfaces) and exception handling(e.g. invalid id or quantity)? There should be two categories named foods and drinks. In the food tab, there should be two categories named main courses and desserts. On the drinks tab, there should be hot and cold drinks categories and they should appear there. Added to cart must be removed later. new items do not have to be added with the gui, they can be added directly to the array. After pressing order, it should say 'your order has been received'. Collect the prices of the products added to the card and display them on the screen. you can set up a class hierarchy like in the diagram

java using Proper class hierarchy (inheritance, interfaces) and exception handling(e.g. invalid id

Briefly, This is a restaurant ordering application, the customer should be able to add the products they choose to the card using this application and see the total price. No need for payment. When the payment button is clicked, the application can be closed by typing 'your order has been received'. No need for admin or manager account, new product can be added to the product list from the code. After the user has burned the product ID and how many, clicks add to the card, the product is added to the card and the total price is displayed. The user can put more than one product. For exception handling, the user cannot enter a non-existent id and cannot enter 0 or a negative number in the piece part. If he does, he should receive an error message.

ID Name Quantity Name Quantity Price Price 11.0 Pizza Cancel Which ID item You want? Enter Quantity Order Add to cart Back Bill Customer Payment PK Customerld: int HE Made by PK TransactionID: int Name: varchar(100) HT 08 FK Customerld: int #FK2 OrderID: int ContactNo: varchar(15) Address: varchar(255) RewardPoints: int PaymentTime: timestamp Amount decimal(2) Placed by Email: varchar(100) Pay for Status: int Order PK OrderID: int FK1 CustomerlD: int OrderTime: timestamp Status: int includes TotalPrice: decimal(2) Remarks: varchar(255) Order_Product PK Code: int FK1 OrderiD: int * FK2 ProductCode: int Product Qty: int PK ProductCode: int HT includes Price: decimal(2) Description: varchar(255) StockQty: int Price: decimal(2) SupplierName: varchar(100)

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!