Ejemplo n.º 1
0
 public Mocha(Beverage beverage)
 {
     this.beverage = beverage;
 }
Ejemplo n.º 2
0
        private Beverage decorateCoffee(string bev, Beverage coffee)
        {
            Beverage c;
                switch (bev)
                {
                    case "Mocha":
                        c = new Mocha(coffee);
                        break;
                    case "Soy":
                        c = new Soy(coffee);
                        break;
                    case "SteamedMilk":
                        c = new SteamedMilk(coffee);
                        break;
                    case "WhipCream":
                        c = new Whip(coffee);
                        break;
                    default:
                        c = null;
                        break;
                }

            return c;
        }