Make the Pizza example abstract Solution
(Not rated)
(Not rated)
Make the Pizza example abstract, so that there are three kinds of factories under one AbstractPizzaFactory You can use Java or C++ ChicagoFactory that always uses thick crust, double sauce, and double cheese, then uses whatever extra toppings the user asks for. New York Factory that always uses thin crust, light sauce, and cheese, then whatever toppings someone asks for. California Factory that always uses thin crust, no sauce, and cheese, then whatever weird toppings someone asks for
Use an enumerator for the toppings. California will have different toppings in its enumerator than the other 2.
Make 3 pizzas in main
- NewYork with sausage and mushrooms
- Chicago style with ham and red peppers
- California style with avocado, brie, and the tears of a baby duck
11 years ago
Complete A++ Solution
NOT RATED
Purchase the answer to view it
- abstract_pizza_factory_answer.zip