static void Main(string[] args)
        {
            PizzaFactory pizzaFactory = new NYPizzaFactory();

            Pizza pizza = pizzaFactory.CreatePizza("Margarita");

            pizza.Prepare();
            pizza.Bake();
            pizza.Cut();
            pizza.Box();
        }
Beispiel #2
0
        static void Main(string[] args)
        {
            PizzaStore dbstore = new DBPizzaStore();
            //PizzaStore bjstore = new BJPizzaStore();

            Pizza pizza = dbstore.OrderPizza("cheese");

            Console.WriteLine(pizza.GetName());
            Console.WriteLine(pizza.Prepare());
            Console.WriteLine(pizza.Cut());
            Console.WriteLine(pizza.Box());
            Console.WriteLine(pizza.Bake());

            //pizza = bjstore.OrderPizza("cheese");
            //Console.WriteLine(pizza.GetName());
        }