| 3 | import CreationalDesignPattern.FactoryPattern.AbstractFactoryPattern.IngredientFactories.PizzaIngredientFactory; |
| 4 | |
| 5 | public class CheesePizza extends Pizza{ |
| 6 | PizzaIngredientFactory ingredientFactory; |
| 7 | |
| 8 | public CheesePizza(PizzaIngredientFactory ingredientFactory){ |
| 9 | this.ingredientFactory = ingredientFactory; |
| 10 | } |
| 11 | |
| 12 | @Override |
| 13 | void prepare() { |
| 14 | System.out.println("Preparing " + name); |
| 15 | dough = ingredientFactory.createDough(); |
| 16 | cheese = ingredientFactory.createCheese(); |
| 17 | pepperoni = ingredientFactory.createPepperoni(); |
| 18 | |
| 19 | } |
| 20 | } |
nothing calls this directly
no outgoing calls
no test coverage detected