Exemplo n.º 1
0
        public static void SheepCount(Sheep sheep)
        {//takes an input sheep, counts to an input,
         //clones it, counts the clone to another input,
         //then resets the original sheep and counts to a final input
            Console.WriteLine("Counting sheep. . .");
            CountUtil.Count(sheep, Counter());

            Console.WriteLine("Cloning sheep. . .");
            Sheep dolly = Cloner(sheep);

            CountUtil.Count(dolly, Counter());

            Console.WriteLine("Counting sheep. . .");
            sheep.ResetCount();
            CountUtil.Count(sheep, Counter());
        }
Exemplo n.º 2
0
 public static void GatorCount(Alligator gator)
 {//takes an input alligator and counts to 3
     Console.WriteLine("Counting alligators. . .");
     CountUtil.Count(gator, Counter());
 }