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( ).

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter3: Using Methods, Classes, And Objects
Section: Chapter Questions
Problem 13PE
icon
Related questions
Question

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( ).

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Knowledge Booster
void method
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage