예제 #1
0
        static void Main(string[] args)
        {
            cat myCat = new cat("Pussy");

            Console.Write(myCat.roar());
            Console.Write("\n" + myCat.run());
            Console.Write("\n" + myCat.getInfo());

            Console.Write("\n\n");

            eagle myBird = new eagle("Condorito");

            Console.Write(myBird.chop());
            Console.Write("\n" + myBird.fly());
            Console.Write("\n" + myBird.getInfo());

            worm worm1 = new worm();

            Console.Write("\n" + myBird.eat(worm1));

            Console.ReadLine();
        }
예제 #2
0
 public string eat(worm food)
 {
     return(food.eaten(name));
 }