Exemplo n.º 1
0
 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 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("");
        }
Exemplo n.º 3
0
 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");
 }
Exemplo n.º 4
0
 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");
 }
Exemplo n.º 5
0
        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());
        }