Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I need this task to be solved for Java. Define a class called Pizza that has member variables to track the type of pizza (either

I need this task to be solved for Java.

image text in transcribed

Define a class called Pizza that has member variables to track the type of pizza (either deep dish, hand tossed, or pan) along with the size (either small, medium, or large) and the number of pepperoni or cheese toppings. You can use constants to represent the type and size. Include mutator and accessor functions for your class. Create a void function, outputDescription(), that outputs a textual description of the pizza object. Also include a function, computePrice( ), that computes the cost of the pizza and returns it as a double according to the following rules: Small pizza = $5 +$1 per topping Medium pizza = $7 + $1 per topping Large pizza = $9 + $1 per topping Add an Order class that contains a private ArrayList or HashMap that stores Pizza. This class represents a customer's entire order, where the order may consist of multiple pizzas. Include appropriate functions so that a user of the Order class can add pizzas to the order (type is deep dish, hand tossed, or pan; size is small, medium, or large; number of pepperoni or cheese toppings). You can use constants to represent the type and size

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Concepts

Authors: David M Kroenke, David J Auer

6th Edition

0132742926, 978-0132742924

More Books

Students also viewed these Databases questions