示例#1
0
        static void Main(string[] args)
        {
            Horse horse = new Horse("MrErd");

            horse.Speak();
            horse.product();
            horse.House();
            horse.eat();

            Console.Write("\n");

            Cows cow = new Cows("cow", "moo");

            cow.speak();
            cow.product();
            cow.House();
            cow.eat();


            Console.Write("\n");


            Goat goat = new Goat("goat", "bleat");

            goat.speak();
            goat.product();
            goat.House();
            goat.eat();


            Console.Write("\n");


            Dog dog = new Dog("dog", "bark");

            dog.speak();
            dog.product();
            dog.House();
            dog.eat();
        }