Exemplo n.º 1
0
        public static void Main()
        {
            Console.WriteLine("*************Chicken*****************");
            var chip = new Chicken();

            Console.WriteLine("Chip says: {0}", chip.MakeSound());
            Console.WriteLine("Chip eats: {0}", chip.HowToEat());

            Console.WriteLine("*************Tiger*****************");
            var purma = new Tiger();

            Console.WriteLine("Purma says: {0}", purma.MakeSound());

            Console.WriteLine("*************Apple*****************");
            var china = new Apple();

            Console.WriteLine(china.HowToEat());

            Console.WriteLine("*************Orange*****************");
            var sanh = new Orange();

            Console.WriteLine(sanh.HowToEat());

            Console.ReadKey();
        }