Question: This question involves the implementation of a pizza ordering system that is represented by the Pizza class. A Pizza object is created with parameters that
This question involves the implementation of a pizza ordering system that is represented by the Pizza class. A Pizza object is created with parameters that accepts the topping, size, and number of slices.
The Pizza class provides a plus the following methods.
setSize, which allows the size to be set to Large or Medium the two size pizza pans that are used.
setTopping, which allows for 1 topping to be to be set for a pizza object
setNumSlices which allows for the number of slides desired to be set.
getSize which returns the size of the pizza
getTopping, which returns the topping on the pizza
getNumSlices, which returns the number of slices in the pizza
getWeight which returns the weight of the pizza If the pizza is a large pizza it weights between 24 - 30 ounces. If the pizza is a medium pizza it weighs between 16 - 20 ounces. Pizza weight will always be in whole numbers
getWeightPerSlice which returns the weight of 1 slice of pizza including partial ounces
toString, which returns a string value with the information about what topping is on the pizza, what size the pizza is and how many slices the pizza is.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
