Write a C++ program as described the following Create a class named MELTING SPOT that stores information about single pizza. It should contain the following:
Write a C++ program as described the following
Create a class named MELTING SPOT that stores information about single pizza. It
should contain the following:
• Private variables to store the size of pizza (“small”, “medium” or “large”), the
number of cheese topping and number of pepperoni toppings and the name of
the shop.
• Public method to set the data for pizza like size, and number of cheese and
pepperoni toppings.
• Public method named calculate Cost() that calculates the cost of pizza.
• Pizza cost is determined by:
Small: 10 $ + 2$ per topping
Medium: 12$ +4$ per topping
Large: 14$+ 6$ per topping
Create 3 – 4 pizza objects and display their final cost and the name of name of
the shop. For example, a small pizza with 2 cheese toppings and 3 pepperoni
toppings at melting spot costs around 20$.
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 2 images