Menu

Please Help Complete Question Java 411 Create Class Named Pizza Stores Information Single Q43898706

**PLEASE HELP ME COMPLETE THIS QUESTION INJAVA**

4.11) Create a class named Pizza that stores information about asingle pizza. It should
contain the following:
Private instance variables to store the size of the pizza (eithersmall, medium, or large), the number of cheese toppings, the numberof pepperoni toppings, and the number of ham toppings.
Constructor(s) that set all of the instance variables.
Public methods to get and set the instance variables.
A public method named calcCost( ) that returns a double that is thecost of the pizza.
Pizza cost is determined by:
Small: $10 + $2 per topping
Medium: $12 + $2 per topping
Large: $14 + $2 per topping
A public method named getDescription() that returns a Stringcontaining the pizza size, quantity of each topping, and the pizzacost as calculated by calcCost().
Write main method that asks for pizza size and number of toppingsfor each category. It should then initialize Pizza class and Printout the string from getDescription();

**IT HAS TO FOLLOW THIS RESULT**:

Enter·the·size·of·Pizza:Large↵

Enter·the·number·of·Cheese·toppings:2↵

Enter·the·number·of·Pepperoni·toppings:0↵

Enter·the·number·of·Ham·toppings:1↵

Large·Pizza·with·2·Cheese·toppings,·0·Pepperoni·toppings,·and·1·Ham·toppings.↵

Total·Price:·20.0↵

THANK YOU IN ADVANCE

Expert Answer


Answer to **PLEASE HELP ME COMPLETE THIS QUESTION IN JAVA** 4.11) Create a class named Pizza that stores information about a singl…

OR