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]); } }
// Init method public Taxer(string name, string car, WorkChange type, List <WorkDays> week) : base(name) { Name = name; Car = car; Schedule = new WorkWeek(type, week); }