| 4 | import CreationalDesignPattern.FactoryPattern.AbstractFactoryPattern.IngredientFactories.PizzaIngredientFactory; |
| 5 | |
| 6 | public class ChicagoPizzaStore extends PizzaStore{ |
| 7 | @Override |
| 8 | Pizza createPizza(String pizzaType) { |
| 9 | Pizza pizza = null; |
| 10 | PizzaIngredientFactory ingredientFactory = new ChicagoIngredientFactory(); |
| 11 | |
| 12 | if (pizzaType.equals("cheese")){ |
| 13 | pizza = new CheesePizza(ingredientFactory); |
| 14 | pizza.setName("Chicago Style Cheese Pizza"); |
| 15 | } |
| 16 | else if (pizzaType.equals("clam")){ |
| 17 | pizza = new ClamPizza(ingredientFactory); |
| 18 | pizza.setName("Chicago Style Clam Pizza"); |
| 19 | } |
| 20 | else if (pizzaType.equals("mushroom")){ |
| 21 | pizza = new MushroomPizza(ingredientFactory); |
| 22 | pizza.setName("Chicago Style Mushroom Pizza."); |
| 23 | } |
| 24 | return pizza; |
| 25 | } |
| 26 | } |
nothing calls this directly
no outgoing calls
no test coverage detected