Пример #1
0
        static void Main(string[] args)
        {
            Drink cola = new Drink(new ColaFactory());

            cola.DrinkBottle();
            cola.DrinkLiquid();
            Console.WriteLine();


            Drink fanta = new Drink(new FantaFactory());

            fanta.DrinkBottle();
            fanta.DrinkLiquid();
            Console.WriteLine();


            Drink sprite = new Drink(new SpriteFactory());

            sprite.DrinkBottle();
            sprite.DrinkLiquid();
            Console.WriteLine();

            Console.ReadKey();
        }