Ejemplo n.º 1
0
        private static void DozensCounter()
        {
            Incrementer incrementer   = new Incrementer();
            Dozens      dozensCounter = new Dozens(incrementer);

            incrementer.DoCount();
            Console.WriteLine("number of dozens = {0}", dozensCounter.DozensCount);
        }
Ejemplo n.º 2
0
 public Dozens(Incrementer incrementer)
 {
     DozensCount              = 0;
     incrementer.CountADozen += IncrementDozensCount;
 }