MCPcopy Create free account
hub / github.com/Anchals24/Low-Level-Design / CheesePizza

Class CheesePizza

AbstractFactoryPattern/CheesePizza.java:5–20  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3import CreationalDesignPattern.FactoryPattern.AbstractFactoryPattern.IngredientFactories.PizzaIngredientFactory;
4
5public 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}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected