1: Create a enum PizzaType, which has the following entries: PIZZA_TYPE_PLAIN, PIZZA_TYPE_PEPPERONI, PIZZA_TYPE_SAUSAGE, PIZZA_TYPE_VEGGIE

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter10: Introduction To Inheritance
Section: Chapter Questions
Problem 6PE
icon
Related questions
Question

1: Create a enum PizzaType, which has the following entries:

PIZZA_TYPE_PLAIN, PIZZA_TYPE_PEPPERONI, PIZZA_TYPE_SAUSAGE, PIZZA_TYPE_VEGGIE

2: 

Create a class PizzaSalesBarChart, which inherits from StoreSalesBarChart.

Create a addPizzaSales(enum PizzaType) method. Return different value for different types of pizza.  

Create it own version of StoreSalesBarChart setDailySales(String salesName). This method should create a  PizzaSalesBarChart instance, generate a random pizza type value  10 times and call addPizzaSales for each  pizza type value, then return the PizzaSalesBarChart instance.

 

In JoePizzaShop's main method, instead of calling "StoreSalesBarChart.setDailySales(salesName)", call " PizzaSalesBarChart .setDailySales(salesName)" and see what happens.

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps

Blurred answer
Knowledge Booster
Form and its Elements
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
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage