static void Main(string[] args) { var machine = new HotDrinkMachine(); var coffee = machine.MakeDrink(); var tea = machine.MakeDrink(); }
static void Main(string[] args) { var machine = new HotDrinkMachine(); var drink = machine.MakeDrink(HotDrinkMachine.AvailableDrink.Tea, 100); drink.Consume(); }
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(); }