public override string ToString() { return($"Dough: {Dough.GetType().Name}\n" + $"Sauce: {Sauce.GetType().Name}\n" + $"Cheese: {Cheese.GetType().Name}\n" + $"Veggies: {string.Join(", ", Veggies.Select(n => n.GetType().Name).ToArray())}\n"); }
public override string ToString() { return($"Dough: {Dough.GetType().Name}\n" + $"Sauce: {Sauce.GetType().Name}\n" + $"Cheese: {Cheese.GetType().Name}\n" + $"Clam: {Clam.GetType().Name}\n"); }
public void DescribeIngredients() { Console.WriteLine(""); Console.WriteLine("---------------------------------------"); Console.WriteLine($"This pizza is a {Name}"); if (Dough != null) { Console.WriteLine($"Dough is {Dough.GetType().Name} "); } if (Sauce != null) { Console.WriteLine($"Sauce is {Sauce.GetType().Name} "); } if (Cheese != null) { Console.WriteLine($"Cheese is {Cheese.GetType().Name} "); } if (Meat != null) { Console.WriteLine($"Meat is {Meat.GetType().Name} "); } Console.WriteLine("---------------------------------------"); Console.WriteLine(""); }
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() { Dough = ingredientFactory.CreateDough(); Cheese = ingredientFactory.CreateCheese(); Clams = ingredientFactory.CreateClams(); Sauce = ingredientFactory.CreateSause(); Console.WriteLine($"Preparing {Name}"); Console.WriteLine(Dough.GetType().ToString()); Console.WriteLine(Sauce.GetType().ToString()); Console.WriteLine(Cheese.GetType().ToString()); Console.WriteLine(Clams.GetType().ToString()); }
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()); } }