public override string ToString() { return($"Dough: {Dough.GetType().Name}\n" + $"Sauce: {Sauce.GetType().Name}\n" + $"Cheese: {Cheese.GetType().Name}\n" + $"Pepperoni: {Pepperoni.GetType().Name}\n"); }
public override void Prepare() { Pepperoni = ingredientFactory.CreatePepperoni(); Dough = ingredientFactory.CreateDough(); Veggies = ingredientFactory.CreateVeggies(); Console.WriteLine($"Preparing {Name}"); Console.WriteLine(Pepperoni.GetType().ToString()); Console.WriteLine(Dough.GetType().ToString()); foreach (var item in Veggies) { Console.WriteLine(item.GetType().ToString()); } }