Beispiel #1
0
        public override ATruePizza Make()
        {
            ATruePizza custPizza1 = new CustomPizza();

            System.Console.Write("Select a size: ");
            var custSize  = Console.ReadLine();
            var cust_Size = custPizza1.Size = new Size(custSize);

            System.Console.Write("Select a crust: ");
            var custCrust  = Console.ReadLine();
            var cust_Crust = custPizza1.Crust = new Crust(custCrust);

            custPizza1.Toppings = new List <Topping>();
            custPizza1.Toppings.Add(new Topping("Tomato Sauce"));
            custPizza1.Toppings.Add(new Topping("Cheese"));
            System.Console.WriteLine("Select up to three additional toppings: ");
            var custTopping = Console.ReadLine();

            custPizza1.Toppings.Add(new Topping(custTopping));
            System.Console.WriteLine("Select up to three additional toppings: ");
            custTopping = Console.ReadLine();
            custPizza1.Toppings.Add(new Topping(custTopping));
            System.Console.WriteLine("Select up to three additional toppings: ");
            custTopping = Console.ReadLine();
            custPizza1.Toppings.Add(new Topping(custTopping));

            return(custPizza1);
        }
Beispiel #2
0
        public override ATruePizza Make()
        {
            ATruePizza FinalPizza = new CustomPizza();

            FinalPizza.Crust = new Crust("Chicago", Convert.ToDecimal("3.50"));
            FinalPizza.Size  = new Size("Large", Convert.ToDecimal("2.00"));
            FinalPizza._toppings.Add(new Topping("Cheese", Convert.ToDecimal("2.20")));
            FinalPizza._toppings.Add(new Topping("Pork Sausage", Convert.ToDecimal("3.00")));
            FinalPizza.Cost = SpecifityPizza(ref FinalPizza);
            return(FinalPizza);
        }
Beispiel #3
0
        public override ATruePizza Make()
        {
            ATruePizza NewYork_Pizza = new CustomPizza();

            NewYork_Pizza.Crust    = new Crust("Hand Tossed Thin Crust");
            NewYork_Pizza.Size     = new Size("Large");
            NewYork_Pizza.Toppings = new List <Topping>();
            NewYork_Pizza.Toppings.Add(new Topping("Tomato Sauce"));
            NewYork_Pizza.Toppings.Add(new Topping("Cheese"));
            // NewYork_Pizza.Toppings.Add(new Topping("Pepperoni"));
            // NewYork_Pizza.Toppings.Add(new Topping("Sausage"));
            return(NewYork_Pizza);

            //Components.Add(new Crust("NewYork"));
        }
Beispiel #4
0
        public override ATruePizza Make()
        {
            ATruePizza a = new CustomPizza();

            return(a);
        }