Пример #1
0
        static void Main(string[] args)
        {
            //IMealFactory factory = new ItalianFactory();
            IMealFactory factory = new IndianFactory();

            IMainCourse main = factory.CreateMainCourse();

            main.Consume();

            IDessert dessert = factory.CreateDessert();

            dessert.Enjoy();
        }
Пример #2
0
        static void Main(string[] args)
        {
            //ICuisine cuisine = new ItalianCuisine();
            ICuisine cuisine = new IndianCuisine();

            IMainCourse main = cuisine.CreateMainCourse();

            main.Consume();

            IDessert dessert = cuisine.CreateDessert();

            dessert.Enjoy();
        }