Question: Define a class called Order Pizza that has member variables to track the type of pizza being order (either deep dish, hand tossed, or pan)

 Define a class called Order Pizza that has member variables to

Define a class called Order Pizza that has member variables to track the type of pizza being order (either deep dish, hand tossed, or pan) along with the size (small, medium or large), type of toppings (pepperoni, cheese, etc.) and the number of toppings. Create accessors for each property (ex.: type, size, type of toppings, and number of toppings). Implementation class should have a Calculate Order Payment method to compute the total cost of the pizza order and return it as a double according to the rules: Small pizza = $10 + $2 per topping Medium pizza = $14 + S2 per topping Large pizza = $17 + $2 per topping Also a PrintReceipt method to display the order information with the total amount to pay. Write a OrderPizzaTest class to demonstrate that your program is working. IMPORTANT: remember to initialize the constructor (example: if we use the given default values for the example below the total amount to pay is $23: OrderPizza my PizzaOrder = new OrderPizza ("deep dish", "large", "cheese", 3); Lastly, prompt the user to enter a new order with different values and redisplay the output with the new information. //CLASS IMPLEMENTATION BEGINS HERE public class OrderPizza {

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!