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. 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
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
