static void Main(string[] args) { //create a simple coffee machine var simpleCoffeeMachine = new SimpleCoffeeMachine(); //brew coffee simpleCoffeeMachine.BrewCoffee(); var premiumCoffeeMachine = new PremiumCoffeeMachine(); //create an adapter for premium coffee var adapter = new PremiumCoffeeMachineAdapter(premiumCoffeeMachine, CoffeeKind.Expresso); //brew coffee adapter.BrewCoffee(); }
public PremiumCoffeeMachineAdapter(PremiumCoffeeMachine coffeeMachine, CoffeeKind coffeeKind) { this.coffeeMachine = coffeeMachine; this.coffeeKind = coffeeKind; }