Question: I need this task to be solved for Java. Define a class called Pizza that has member variables to track the type of pizza (either

I need this task to be solved for Java.

I need this task to be solved for Java. Define a class

Define a class called Pizza that has member variables to track the type of pizza (either deep dish, hand tossed, or pan) along with the size (either small, medium, or large) and the number of pepperoni or cheese toppings. You can use constants to represent the type and size. Include mutator and accessor functions for your class. Create a void function, outputDescription(), that outputs a textual description of the pizza object. Also include a function, computePrice( ), that computes the cost of the pizza and returns it as a double according to the following rules: Small pizza = $5 +$1 per topping Medium pizza = $7 + $1 per topping Large pizza = $9 + $1 per topping Add an Order class that contains a private ArrayList or HashMap that stores Pizza. This class represents a customer's entire order, where the order may consist of multiple pizzas. Include appropriate functions so that a user of the Order class can add pizzas to the order (type is deep dish, hand tossed, or pan; size is small, medium, or large; number of pepperoni or cheese toppings). You can use constants to represent the type and size

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!