Pizza in java, programming homework help

User Generated

fgrrs26

Programming

Description

please fined the attachment.

Unformatted Attachment Preview

You will create a straightforward Pizza ordering system using class inheritance. The final project will consist of three files: MainPizza.java This is the control program (contains the main method) Pizza.java This is the Pizza class definition (contains the constructor and get and set methods) Cheese.java This class extends the Pizza class You will create a simple pizza ordering system using polymorphism. Requirements for each file: MainPizza.java Request pizza type (Meat or Cheese) from user (scanner) Create a single pizza (for either Cheese or Meat) o o If meat is requested, then  Instantiate your pizza as Pizza myPizza with no arguments and set the type to Meat  Using the constructor If Cheese is selected, then  Instantiate your pizza as Cheese myPizza with no arguments Output your order details (based upon Cheese or Meat) as shown: Pizza.java The default constructor should set pizzaType to Meat and the price to $6    setCrust method should allow selection of Thick or Thin setIngredients method should allow for only one ingredient setCost method will add $2 to the cost of the pizza Create the appropriate accessor methods (note all instance variables should be private) Cheese.java Set the pizza type to cheese using the constructor setCrust method (not the same as Pizza setCrust method) sets the crust to Thin Probable output What type of pizza would you like to buy (Cheese or Meat)?: Cheese Your Order is: Cheese pizza Thin crust Total cost is $6.00 What type of pizza would you like to buy (Cheese or Meat)?: Meat What type of crust (Thin or Thick)?: Thick What ingredient (limit one)?: Sausage Your order is: Meat pizza Sausage (+ $2.00) Thick crust Total cost is $8.00
Purchase answer to see full attachment
User generated content is uploaded by users for the purposes of learning and should be used following Studypool's honor code & terms of service.

Explanation & Answer

Hello,Here is java classes only...


Anonymous
Awesome! Perfect study aid.

Studypool
4.7
Trustpilot
4.5
Sitejabber
4.4

Related Tags