//***************************************************************************** // public Section ScheduleSection(int secNumber, string day, string time, string room, int capacity) { // Create a new Section ... Section s = new Section(secNumber, day, time, this, room, capacity); // ... and then remember it! OfferedAsSection.Add(s); return(s); }
//****************************************************************** // public Section ScheduleSection(string day, string time, string room, int capacity) { // Create a new Section (note the creative way in // which we are assigning a section number) ... Section s = new Section(OfferedAsSection.Count + 1, day, time, this, room, capacity); // ... and then add it to the List OfferedAsSection.Add(s); return(s); }