Example #1
0
        static void Main(string[] args)
        {
            ICoffee coffee = new Coffee();

            Console.WriteLine("Price: " + coffee.Price() + " Ingrediants: " + coffee.Ingrediants());

            coffee = new Milk(coffee);

            Console.WriteLine("Price: " + coffee.Price() + " Ingrediants: " + coffee.Ingrediants());

            coffee = new Whip(coffee);

            Console.WriteLine("Price: " + coffee.Price() + " Ingrediants: " + coffee.Ingrediants());

            Console.ReadLine();
        }