Ejemplo n.º 1
0
        public static void DoMeanThings(IAggressive animal)
        {
            Console.WriteLine(" DoMeanThings");

            Console.WriteLine();
            animal.ShowTeeth();

            int legs = animal.Bite();

            if (legs == 1)
            {
                Console.Write("You lost one leg");
            }
            if (legs == 2)
            {
                Console.Write("You lost your legs");
            }
            if (legs == 3)
            {
                Console.Write("You lost your legs and one arm");
            }
            if (legs == 4)
            {
                Console.Write("You lost your legs and your arms");
            }
        }
Ejemplo n.º 2
0
        public static void DoMeanThings(IAggressive animal)
        {
            Header("DoMeanThings");
            animal.ShowTeeth();
            switch (animal.Bite())
            {
            case 1:
                Console.WriteLine("You lost one leg");
                break;

            case 2:
                Console.WriteLine("You lost your legs");
                break;

            case 3:
                Console.WriteLine("You lost one arm");
                break;

            case 4:
                Console.WriteLine("You lost your arms");
                break;
            }
        }
Ejemplo n.º 3
0
        private static void DoMeanThings(IAggressive c)
        {
            c.Bite();

            c.ShowTeeth();
        }
Ejemplo n.º 4
0
 private static void DoMeanThings(IAggressive a)
 {
     a.Bite();
     a.ShowTeeth();
 }