Create an application via NetBeans with named Pizza that storesinformation about a single 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 number ofbeef toppings, and the number of chicken 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: OR10 + OR 2 per topping Medium: OR 12 + OR 2 per topping Large: OR 14 + OR 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( ).
Create an application via NetBeans with named Pizza that stores
information about a single pizza. It should contain the following:
• Private instance variables to store the size of the pizza (either
small, medium, or large), the number of cheese toppings, the number of
beef toppings, and the number of chicken 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 the
cost of the pizza.
Pizza cost is determined by:
Small: OR10 + OR 2 per topping
Medium: OR 12 + OR 2 per topping
Large: OR 14 + OR 2 per topping
• A public method named getDescription( ) that returns a String
containing the pizza size, quantity of each topping, and the pizza
cost as calculated by calcCost( ).
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 1 images