Beispiel #1
0
        public bool AddSection(Section section, string term)
        {
            switch (term)
            {
            case "F":
                return(fallTimetable.AddSection(section));

            case "S":
                return(winterTimetable.AddSection(section));

            case "Y":
                return(winterTimetable.AddSection(section) && fallTimetable.AddSection(section));

            default:
                throw new NotImplementedException(section.Activity.Course.Term + " was not handled before! ");
            }
        }
Beispiel #2
0
        /// <summary>
        /// Make a deep-copy of this timetable
        /// </summary>
        /// <returns></returns>
        public ITimetable MakeCopy()
        {
            SeasonalTimetable copy = new SeasonalTimetable();

            foreach (Section section in sections)
            {
                copy.AddSection(section);
            }
            return(copy);
        }