subject

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 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 rules:

Small pizza = $10 + $2 per topping
Medium pizza = $14 + $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

ansver
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 21:00, bryanatwin1536
Describir textbook icon_person mira los dibujos y describe lo que está pasando. usa los verbos de la lista.
Answers: 1
image
Computers and Technology, 23.06.2019 00:10, makailaaa2
My has been slow anyone else’s ?
Answers: 1
image
Computers and Technology, 23.06.2019 04:00, ittmanny6138
Laire writes a letter to her grandmother, in which she describes an amusement park she visited last week. she adds pictures of that place in her letter. which feature of a word processing program will claire to remove unwanted parts of the pictures?
Answers: 3
image
Computers and Technology, 23.06.2019 10:00, austintules2005
Whats three fourths of 15(this is supposed to be in math but i clicked too fast)
Answers: 1
You know the right answer?
Define a class called Pizza that has member variables to track the type of pizza (either deep dish,...

Questions in other subjects:

Konu
Mathematics, 28.02.2021 05:00
Konu
Arts, 28.02.2021 05:00
Konu
Mathematics, 28.02.2021 05:00
Konu
Mathematics, 28.02.2021 05:00
Konu
Mathematics, 28.02.2021 05:00