A pizza is either just a crust (white or wheat) or a certain amount of a certain topping added to a pizza.
Define a representation for pizzas. Use strings to represent toppings, and a double to represent the amount of the topping. For the crust, a boolean suffices to distinguish white from wheat.
Implement isHealthy for pizzas. A healty pizza has any number of "tomato" and "mushroom" toppings on a wheat crust.
Implement weight for pizzas, which returns the total weight of a pizza. Assume that the crust weighs 0.25 pounds.
Implement isTrulyHealthy. A truly healthy pizza has any number of "tomato" and "mushroom" toppings on a wheat crust, and weighs less than 2 pounds.
Last update: Wednesday, November 12th, 2003mflatt@cs.utah.edu