Beispiel #1
0
        static void Main(string[] args)
        {
            Cow     Besty  = new Cow();
            Chicken Juice  = new Chicken();
            Horse   Jackie = new Horse();
            Dog     Rover  = new Dog();

            Console.WriteLine("Hello welcome to the farm");
            Console.WriteLine("Let's see the animals");
            Console.WriteLine();


            Juice.Talk();
            Besty.Talk();
            Jackie.Talk();
            Rover.Talk();

            newAnimal();
        }
Beispiel #2
0
        static void Main(string[] args)
        {
            //build a farm
            Cow     betsy    = new Cow();
            Chicken little   = new Chicken();
            Goat    billy    = new Goat();
            Sheep   lambchop = new Sheep();

            Console.WriteLine("Hello and welcome to my farm!");
            Console.WriteLine("Let me introduce you to our animals");
            Console.WriteLine();

            //Call the animals
            lambchop.Talk();
            little.Talk();
            billy.Talk();
            betsy.Talk();
            //our custom animal
            newAnimal();
        }