public static void Main()
        {
            var machine = new HotDrinkMachine();
            var drink   = machine.MakeDrink();

            drink.Consume();
        }
Ejemplo n.º 2
0
        static void Main(string[] args)
        {
            var machine = new HotDrinkMachine();
            var drink   = machine.MakeDrink(AvailableDrink.Chocolate, 300);

            drink.Consume();
        }
Ejemplo 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(HotDrinkMachine.AvailableDrink.Coffee, 2);
            var drink = machine.MakeDrink();

            drink.Consume();
        }
Ejemplo n.º 5
0
        static void Main(string[] args)
        {
            var m = new HotDrinkMachine();
            //var d = m.MakeDrink(HotDrinkMachine.AvailableDrink.Tea, 5);
            //d.Consume();

            var d = m.MakeDrink();
        }
Ejemplo n.º 6
0
        static void Main(string[] args)
        {
            var machine = new HotDrinkMachine();
            var drink   = machine.MakeDrink();

            //drink.Consume();
            WriteLine("Hello World!");
            ReadKey();
        }
Ejemplo n.º 7
0
        static void Main(string[] args)
        {
            var machine = new HotDrinkMachine();

            machine.MakeDrink(HotDrinkMachine.AvailableDrink.Tea, 100);
            machine.MakeDrink(HotDrinkMachine.AvailableDrink.Coffee, 150);

            Console.ReadLine();
        }
Ejemplo n.º 8
0
        static void Main(string[] args)
        {
            var machine = new HotDrinkMachine();
            var drink   = machine.MakeDrink(HotDrinkMachine.AvailableDrink.Tea, 100);

            drink.consumes();

            Console.ReadLine();
        }
Ejemplo n.º 9
0
        static void Main(string[] args)
        {
            var machine = new HotDrinkMachine();
            //var drink = machine.MakeDrink(HotDrinkMachine.AvailableDrink.Tea, 300);
            //drink.Consume();

            IHotDrink drink = machine.MakeDrink();

            drink.Consume();
        }
Ejemplo n.º 10
0
        static void Main(string[] args)
        {
            HotDrinkMachine hotDrinkMachine = new HotDrinkMachine();

            hotDrinkMachine.MakeDrink(HotDrinkMachine.AvailableDrinks.Coffee, 2).Consume();
            WriteLine("");
            ReadKey();

            // Go to http://aka.ms/dotnet-get-started-console to continue learning how to build a console app!
        }
Ejemplo n.º 11
0
        static void Main(string[] args)
        {
            var machine = new HotDrinkMachine();
            var tea     = machine.MakeDrink(nameof(Tea), 150);

            tea.Consume();
            var coffee = machine.MakeDrink(nameof(Coffee), 70);

            coffee.Consume();
        }
Ejemplo n.º 12
0
        // OCP - open close principal
        static void Main(string[] args)
        {
            WriteLine("Abstract Factory Method \n");

            var machine = new HotDrinkMachine();
            var drink   = machine.MakeDrink();

            // var drink = machine.MakeDrink(HotDrinkMachine.AvailableDrink.Tea, 100);
            drink.Consume();
            WriteLine();
        }
Ejemplo n.º 13
0
        static void Main(string[] args)
        {
            var hdm = new HotDrinkMachine();
            //var drink = hdm.MakeDrink(HotDrinkMachine.AvailableDrink.Coffee, 100);
            //drink.Consume();
            var drink = hdm.MakeDrink();

            drink.Consume();


            Console.Read();
        }
Ejemplo n.º 14
0
        static void Main(string[] args)
        {
            var machine = new HotDrinkMachine();
            //var drink = machine.MakeDrink(HotDrinkMachine.AvaibleDrink.Tea, 100);
            //drink.Consume();
            //WriteLine();

            //var drink2 = machine.MakeDrink(HotDrinkMachine.AvaibleDrink.Coffee, 100);
            //drink2.Consume();
            //ReadKey();
            var drink = machine.MakeDrink();

            drink.Consume();
            ReadKey();
        }
 static void Main(string[] args)
 {
     var machine = new HotDrinkMachine();
 }
Ejemplo n.º 16
0
        static void Main(string[] args)
        {
            HotDrinkMachine machine = new HotDrinkMachine();

            machine.PrepareDrink(HotDrinkMachine.AvailableDrink.Coffee, 1);
        }