예제 #1
0
 public WorkWeek(WorkChange type, List <WorkDays> week)
 {
     if (week.Count == 0 || week.Count > 7)
     {
         throw new ArgumentException("Invalid number of work-days");
     }
     Change   = type;
     schedule = new List <WorkDays>();
     for (int i = 0; i < week.Count; i++)
     {
         schedule.Add(week[i]);
     }
 }
예제 #2
0
 // Init method
 public Taxer(string name, string car, WorkChange type, List <WorkDays> week) : base(name)
 {
     Name     = name;
     Car      = car;
     Schedule = new WorkWeek(type, week);
 }