Esempio n. 1
0
 static void Main(string[] args)
 {
     Beverage beverage = new DarkRoast();
     beverage = new MilkShot(beverage);
     beverage = new Mocha(beverage);
     Console.WriteLine(string.Format("{0}: {1}", beverage.GetDescription(), beverage.GetCost()));
 }
Esempio n. 2
0
        static void Main(string[] args)
        {
            Beverage beverage = new DarkRoast();

            beverage = new MilkShot(beverage);
            beverage = new Mocha(beverage);
            Console.WriteLine(string.Format("{0}: {1}", beverage.GetDescription(), beverage.GetCost()));
        }