Example #1
0
        static void Main(string[] args)
        {
            Beverage espresso                = new Espresso();
            Beverage espressoWithMilk        = new Milk(espresso);
            Beverage espressoWithMilkAndWhip = new Whip(espressoWithMilk);

            Console.WriteLine($"{espressoWithMilk.GetDescription()} : {espressoWithMilk.Cost()}");
            Console.WriteLine($"{espressoWithMilkAndWhip.GetDescription()} : {espressoWithMilkAndWhip.Cost()}");
            Console.Read();
        }