public override void Prepare() { Dough = _ingredientFactory.CreateDough(); Cheese = _ingredientFactory.CreateCheese(); Sauce = _ingredientFactory.CreateSauce(); Veggie = _ingredientFactory.CreateVeggie(); }
public Pizza(IIngredientFactory ingredientFactory) { IngredientFactory = ingredientFactory; Dough = IngredientFactory.CreateDough(); Sauce = IngredientFactory.CreateSauce(); Meat = IngredientFactory.CreateMeat(); Veggie = IngredientFactory.CreateVeggie(); }