Пример #1
0
 public Course(String Course_Name, int credit_hours, int max_roster_size,
               TimeDOW dateandtime)
 {
     _dateandtime     = dateandtime;
     _Course_Name     = Course_Name;
     _Roster          = new Dictionary <string, Student>();
     _credit_hours    = credit_hours;
     _max_roster_size = max_roster_size;
 }
Пример #2
0
        /*public Course(String Course_Name, int max_roster_size)
         * {
         *      _Course_Name = Course_Name;
         *      _Roster = new Dictionary<string, Student>();
         *      _credit_hours = 3;
         *      _max_roster_size = max_roster_size;
         * }*/

        public Course(String Course_Name, int credit_hours, int max_roster_size,
                      int[] days, int start_time, int end_time)
        {
            _dateandtime     = new TimeDOW(days, start_time, end_time);
            _Course_Name     = Course_Name;
            _Roster          = new Dictionary <string, Student>();
            _credit_hours    = credit_hours;
            _max_roster_size = max_roster_size;
        }
Пример #3
0
 public bool Overlap(TimeDOW other)
 {
     for (int i = _time_start; i <= _time_end; i++)
     {
         if (i >= other._time_start && i <= other._time_end)
         {
             for (int j = 0; j < 7; j++)
             {
                 if (other._days_of_week[j] > 0 && _days_of_week[j] > 0)
                 {
                     return(true);
                 }
             }
         }
     }
     return(false);
 }