Lab: Thursday July 7th

Pizza Parlor

A Pizza at our restaurant is either thin or thick crust, with either tomato, barbecue or white sauce, cheese and one topping.

The topping is either Pepperoni, GreenPepper, ExtraCheese, or Chicken.

The pepperoni topping records how many slices of pepperoni are on the pizza, the GreenPepper records how many peppers were used, the extra cheese records the weight, and the chicken records the number of chicken pieces used.

Develop a data design and Java representation for Pizza and the Toppings.

At our restaurant, we need to report the price of a pizza. The base price of a pizza is $6, each topping has it's own price ranging between $0.50 for ExtraCheese and $1.50 pepperoni. Create a program that will report the price of a pizza

Additionally, we want to report how much profit is made per-pizza. A base pizza costs $2 in ingredients, Pepperoni costs $0.10 a slice, GreenPepper costs $0.40 per pepper, cheese is $0.10 an ounce, and Chicken is $0.06 a piece.
Create a program that reports the profit of a Pizza, reuse the implementation of the price of a pizza.

The owner of our Pizza parlor has a favorite kind of Pizza- thin crust with white sauce and extra cheese. Develop a program that determines whether the current Pizza is the boss's favorite or not.

Our customer is unhappy; he wasn't given the correct topping on his Pizza. Develop a program that will produce a new pizza, that has the specified topping instead of the incorrect one.

Another customer wants to know if the current pizza is the same as the last Pizza he ate, down to the amount of topping on his Pizza. Develop a program that determines if this Pizza has the same contents as the given lastPizza.