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

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 06:30
Martha is designing a single-player game. her manager suggests that she plan the design to incorporate future modifications. which principle of game design relates to planning for future modifications?
Answers: 1
question
Computers and Technology, 23.06.2019 08:30
Helen's credit card has an apr of 15.32% and a grace period of 17 days and helen pays her balance in the full every month. if her last billing cycle ended on september 26, 2009, and she made her payment on october 11, 2009, did she owe any interest on her last statement's balance?
Answers: 3
question
Computers and Technology, 23.06.2019 09:00
Which best describes the role or restriction enzymes in the analysis of edna a. to break dna into fragments that vary in size so they can be sorted and analyzed b. to amplify small amounts of dna and generate large amounts of dna for analysis c. to purify samples of dna obtained from the environment so they can be analyzed d. to sort different sizes of dna fragments into a banding pattern that can be analyzed
Answers: 1
question
Computers and Technology, 23.06.2019 20:50
3.11.3 quiz: comparing and analyzing function typesquestion 4 of 102 pointswhat can you say about the y-values of the two functions f(x) = 3x2-3 andg(x)=2* - 3?
Answers: 2
You know the right answer?
Define a class called Pizza that has member variables to track the type of pizza (either deep dish,...
Questions
question
Mathematics, 20.10.2021 03:50
question
English, 20.10.2021 03:50
question
Mathematics, 20.10.2021 03:50
question
Business, 20.10.2021 03:50
question
Computers and Technology, 20.10.2021 03:50
Questions on the website: 13722363