private SchoolTerm(int termNo, DateTime startD, VictoriaUniversity.UniversityYear uniYear, bool Debug) { TermNumber = termNo; if (Debug) { SetToDebug(); } TermStartDate = startD; if (termNo == 1) { termEnum = Course2.Terms.Term1; } else if (termNo == 2) { termEnum = Course2.Terms.Term2; } else if (termNo == 3) { termEnum = Course2.Terms.Term3; } else if (termNo == 4) { termEnum = Course2.Terms.Term4; } }
public Course(string CourseCode, UniversityYear universityYear) { if (Course.CheckCourseCode(CourseCode)) { this.CourseCode = CourseCode; this.universityYear = universityYear; } else { throw new InvalidOperationException("Course code not right. Needs to be in TAXN201 format"); } }
public UniversityTerm(UniversityYear UniversityYear, DateTime TermStartDate, int TermNumber) { this.universityYear = UniversityYear; this.termStartDate = TermStartDate; if (TermNumber > 0 && TermNumber <= 4) { this.termNumber = TermNumber; } else { throw new InvalidOperationException(); } universityYear.AddTerm(this); }
public UniversityTerm(UniversityYear UniversityYear, DateTime TermStartDate, int TermNumber, List <DateTime> DatesToAdd) { this.universityYear = UniversityYear; this.termStartDate = TermStartDate; this.startDatesOfWeeksInTerm.AddRange(DatesToAdd); if (TermNumber > 0 && TermNumber <= 4) { this.termNumber = TermNumber; } else { throw new InvalidOperationException(); } universityYear.AddTerm(this); }
private static void Build2014(UniversityYear universityYear) { List <DateTime> startDays = new List <DateTime>(); startDays.Add(new DateTime(2014, 3, 3)); startDays.Add(new DateTime(2014, 3, 10)); startDays.Add(new DateTime(2014, 3, 17)); startDays.Add(new DateTime(2014, 3, 24)); startDays.Add(new DateTime(2014, 3, 31)); startDays.Add(new DateTime(2014, 4, 7)); startDays.Add(new DateTime(2014, 4, 14)); new UniversityTerm(universityYear, new DateTime(2014, 3, 3), 1, startDays); startDays.Clear(); startDays.Add(new DateTime(2014, 5, 5)); startDays.Add(new DateTime(2014, 5, 12)); startDays.Add(new DateTime(2014, 5, 19)); startDays.Add(new DateTime(2014, 5, 26)); startDays.Add(new DateTime(2014, 6, 2)); new UniversityTerm(universityYear, new DateTime(2014, 5, 5), 2, startDays); startDays.Clear(); startDays.Add(new DateTime(2014, 7, 14)); startDays.Add(new DateTime(2014, 7, 21)); startDays.Add(new DateTime(2014, 7, 28)); startDays.Add(new DateTime(2014, 8, 4)); startDays.Add(new DateTime(2014, 8, 11)); startDays.Add(new DateTime(2014, 8, 18)); new UniversityTerm(universityYear, new DateTime(2014, 7, 14), 3, startDays); startDays.Clear(); startDays.Add(new DateTime(2014, 9, 8)); startDays.Add(new DateTime(2014, 9, 15)); startDays.Add(new DateTime(2014, 9, 22)); startDays.Add(new DateTime(2014, 9, 29)); startDays.Add(new DateTime(2014, 10, 6)); startDays.Add(new DateTime(2014, 10, 13)); new UniversityTerm(universityYear, new DateTime(2014, 9, 8), 4, startDays); }
public UniversityYear() { this.year = 2014; UniversityYear.Build2014(this); }