Пример #1
0
        static void Main(string[] args)
        {
            PizzaStore nyStore      = new NYPizzaStore();
            PizzaStore chicagoStore = new ChicagoPizzaStore();

            Pizza pizza = nyStore.orderPizza("cheese");

            Console.WriteLine("Ethan ordered a {0}{1}", pizza.Name, Environment.NewLine);

            pizza = chicagoStore.orderPizza("cheese");
            Console.WriteLine("Joel ordered a {0}{1}", pizza.Name, Environment.NewLine);

            Console.ReadLine();
        }
Пример #2
0
        static void Main(string[] args)
        {
            PizzaStore myStore = new NYPizzaStore();

            myStore.OrderPizza("cheese");

            Console.WriteLine("");
            Console.WriteLine("==== NEW ORDER ====");
            Console.WriteLine("");

            PizzaStore myChicagoStore = new ChicagoPizzaStore();

            myChicagoStore.OrderPizza("clam");

            Console.ReadLine();
        }