Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed
Define a class called OrderPizza 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 CalculateorderPayment 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 +$2 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 myPizzaOrder = 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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

Problem16-44 1.Oldmachine,netpresentvalue:$(494,605)...

Answered: 1 week ago

Question

project work smartsheet

Answered: 1 week ago