Esempio n. 1
0
        static void Main(string[] args)
        {
            var machine = new HotDrinkMachine();

            var coffee = machine.MakeDrink();
            var tea    = machine.MakeDrink();
        }
Esempio n. 2
0
        static void Main(string[] args)
        {
            var machine = new HotDrinkMachine();
            var drink   = machine.MakeDrink(HotDrinkMachine.AvailableDrink.Tea, 100);

            drink.Consume();
        }
Esempio n. 3
0
        static void Main(string[] args)
        {
            var machine = new HotDrinkMachine();
            var drink   = machine.MakeDrink();

            drink.Consume();
        }
        static void Main(string[] args)
        {
            var machine = new HotDrinkMachine();
            var drink   = machine.MakeDrink();

            //var drink = machine.MakeDrink(HotDrinkMachine.AvailableDrink.Tea, 100); old way, breaks OCP
            drink.Consume();
            Read();
        }