Question: please solve it in java *Write a java program with the following instructions: Create a java class Item then do the following: Data Members Flavor

 please solve it in java *Write a java program with the

following instructions: Create a java class Item then do the following: Data

Members Flavor Quantity Price Data Type of Member String Int double 1.

please solve it in java

*Write a java program with the following instructions: Create a java class Item then do the following: Data Members Flavor Quantity Price Data Type of Member String Int double 1. Setters and getters data Fields. 2. Create two constructors: one with no arguments, the other with arguments (arguments to assign values of all data fields except the price in the class). 3. Override toString() method: you have to return all data field values. 4. Define calculate Price () method as abstract. Create a java class Pizza which inherited from Item class after that do the following: Data Type of Member Pata Members Toppings Size String String 1. Setters and getters data Fields. 2. Create two constructors: one with no arguments, the other with arguments (arguments to assign values of all data fields in the class). 3. Override toString() method: you have to return all data field values. 4. Override calculate Price () method it will calculate the price of item pizza according to the following: Type of pizza Four Season BBQ Chicken Margherita Price 2.5 JD 11.5 JD RID The price can be computed according to the type of pizza and half a dinar for each topping's user- chosen times the quantity. Note: flavor data member may take just three values four-season, BBQ chicken, or Margherita, and size of pizza may take just small, medium, or large, finally topping may take a combination of corn, olives, or/and onions. Create a java class Ice-cream which inherited from Item class after that do the following: Data Members Inumolscoop bata Type of Member nt 1- Setters and getters data Fields. 2- Create two constructors: one with no arguments, the other with arguments (arguments to assign values of all data fields in the class). 3- Override toString() method: you have to return all data field values. 4- Override calculatePrice () method it will calculate the price of item ice-cream according to the following: Type of ice-cream Strawberry Pistachio Vanilla Price 11.5 JD JD 75 JD The price can be computed according to the type of ice-cream and half a dinar for each scoop's times the quantity Note: flavor data member may take just three values Strawberry, Pistachio, or Vanilla. Create a java class order then do the following: Data Members id Data Type of Member nt ArrayList Houble Jorderitems billAmount Press 1 to insert a new order. Press 2 to list all orders in the system. Press 3 to cancel a specific order. Press O to exit the program Please enter your choice: 1 Please enter 1 for pizza and 2 for ice-cream: 1 Please enter the pizza flavor: BBQ Chicken Please enter the quantity: 1 Please enter the toppings corn, olives, and/or onions: corns Please enter 1 for Add item and 2 for Close Order: 2 Your order is: Flavor Quantity Toppings price 1 BBQ Chicken 1 corns 2JD 1 1 Press 1 to insert a new order. Press 2 to list all orders in the system. Press 3 to cancel a specific order. Press O to exit the program Please enter your choice: 1 Please enter 1 for pizza and 2 for ice-cream: 2 Please enter the ice-cream flavor: Strawberry Please enter the quantity: 1 Please enter the number of scoops you want: 2 Please enter 1 for Add Item and 2 for Close Order: 2 Your order is: | Flavor Quantity # of scoops price Strawberry 1 2 2.5JD I 1 Press 1 to insert a new order. Press 2 to list all orders in the system. Press 3 to cancel a specific order. Press O to exit the program Please enter your choice: 2 The orders in the system are: ID #1 Flavor Quantity Toppings price Margherita 2 olives, onions 5JD 1 Flavor Quantity # of scoops price 1 Pistachio 1 3 3.5JD 1 Total Bill 8.5JD ] ID#2 Flavor Quantity Toppings price BBQ Chicken 1 corns 2JD Total Bill 2JD ID#3 Flavor Quantity # of scoops price I Strawberry 1 2 2.5JD | I Total Bill 2.5JD I Press 1 to insert a new order. Press 2 to list all orders in the system. Press 3 to cancel a specific order. Press O to exit the program Please enter your choice: 3 please enter the order id you want to cancel: 1 The orders in the system are: ID#2 Flavor Quantity Toppings price BBQ Chicken 1 corns 2JD 1 1 Total Bill 2JD I ID#3 Flavor Quantity # of scoops price Strawberry 1 2 2.5JD Total Bill 2.5JD

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!