コード例 #1
0
ファイル: Classes.cs プロジェクト: Kirk7by/mandarin
 public static int CountUpOneWindowOfFullSchedule(PartialSchedule pSchedule)
 {
     int windowsCount = 0;
     for (int dayIndex = 0; dayIndex < Constants.DAYS_IN_WEEK * Constants.WEEKS_IN_SCHEDULE; dayIndex++)
     {
         windowsCount += CountUpOneWindowOfDay(pSchedule.GetClassesOfDay(dayIndex));
     }
     return windowsCount;
 }
コード例 #2
0
 int GetCountClassesOnSecondWeek(PartialSchedule schedule)
 {
     int countClassesInWeek = 0;
     for (int day = Constants.DAYS_IN_WEEK; day < Constants.DAYS_IN_WEEK*Constants.WEEKS_IN_SCHEDULE; day++)
     {
         StudentsClass[] classes = schedule.GetClassesOfDay(day);
         countClassesInWeek += Array.FindAll<StudentsClass>(classes, (c) => c != null).Length;
     }
     return countClassesInWeek;
 }