Example #1
0
        public void PizzaOrdering(Pizzeria pizzeria, PizzaType customerChoice)
        {
            Console.WriteLine($"{Name}: hello, i want to buy {customerChoice}");
            Console.WriteLine();
            Order order = new Order(Name, customerChoice);

            order.OnReady += OrderTaking;
            pizzeria.Receive(order);
        }
Example #2
0
        static void Main(string[] args)
        {
            Pizzeria PizzaHut = new Pizzeria();

            Customer customer1 = new Customer("Mark");
            Customer customer2 = new Customer("Albert");

            customer1.PizzaOrdering(PizzaHut, PizzaType.Sicilian);
            Console.WriteLine();
            customer2.PizzaOrdering(PizzaHut, PizzaType.Chicago);
        }