Question: Please look at the sample OUTPUT before doing this problem. SHOULD BE IN C++. Thank you. Define a class called Pizza that has member variables
Please look at the sample OUTPUT before doing this problem. SHOULD BE IN C++. Thank you.

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 and cheese toppings. You can use constants to represent the type and size. Your class will have four member variables: size, type, pepperoniToppings, cheeseToppings. Include mutator and accessor functions for your class. Create a void O, that outputs a textual description of the pizza object. Also include a function, computePrice0, that computes the cost of the pizza and returns it as a double according to the rules: Small pizza S10 $2 per topping Medium pizza S14$2 per topping Large pizza- $17+ $2 per topping Sample output This pizza is: Small, Hand tossed, with 0 pepperoni toppings and 3 cheese toppings Price of cheesy: 16 This pizza is: Large, Pan, with 2 pepperoni toppings and 1 cheese toppings Price of pepperoni 23 Start with the following main) function: int main0 Pizza cheesy; Pizza pepperoni; cheesy.setCheeseToppings(3); cheesy.setIype(HANDTOSSED); cheesy.outputDescription); cout "Price of cheesy: " cheesy.computePrice() endi. pepperoni.setSize(LARGE) pepperoni.setPepperoniToppings(2); pepperoni.setIype(PAN); pepperoni.outputDescription; cout'Price of pepperoni : " pepperoni.computePrice() endl
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
