public void Visit(AbstractLector lector)
 {
     if (lector != null)
     {
         decimal currentIncome = lector.Income;
         lector.Income *= Increment;
         Console.WriteLine("{0} {1}'s income was {2} and has been changed to {3:F2}!",
             lector.GetType().Name, lector.Name, currentIncome, lector.Income);
     }
 }
 public void Visit(AbstractLector lector)
 {
     if (lector != null)
     {
         int currentDays = lector.WorkFromHomeDays;
         lector.WorkFromHomeDays += days;
         Console.WriteLine("{0} {1}'s working-from-home days was {2} and has been changed to {3}!",
             lector.GetType().Name, lector.Name, currentDays, lector.WorkFromHomeDays);
     }
 }
Exemplo n.º 3
0
 public void Detach(AbstractLector lector)
 {
     this.Lectors.Remove(lector);
 }
Exemplo n.º 4
0
 public void Attach(AbstractLector lector)
 {
     this.Lectors.Add(lector);
 }