Ejemplo n.º 1
0
 /*
  * Method: Initiailize
  * Parameters: N/A
  * Output: N/A
  * Created By: Scott Smoke
  * Date: 5/1/2015
  * Modified By: Scott Smoke
  * 
  * Description: Initialized the exam week.
  * 
  */ 
 private void Initialize()
 {
    
     
     for (int i = 0; i < tc.GetNumberOfDays(); i++ )
     {
         examWeek[i] = new FinalExamDay();
         examWeek[i].SetDay(i+1);
         examWeek[i].SetNumberOfExams(AvailaibleTimeSlotsWithoutLp());
         if (tc.GetLunchPeriod() != 0)
         {
             FinalExam fe = new FinalExam(new CompressedClassTime("Lunch", 12));
             fe.SetStartTime(1200);
             fe.SetEndTime(1200 + MilitaryTime(tc.GetLunchPeriod()));
             examWeek[i].InsertExam(fe);
            // Debug.WriteLine(fe.GetCompressedClass().GetDayOfTheWeek());
         }
         
     }
 }
Ejemplo n.º 2
0
 /*
  * Method: InsertExam
  * Parameters: FinalExamDay fed, CompressedClassTime ct, 
  *             int startTime, int endTime
  * Output: N/A
  * Created By: Scott Smoke
  * Date: 5/3/2015
  * Modified By: Scott Smoke
  * 
  * Description: This inserts an exam into the specified
  * exam day with the specified start and end times.Notes this adds the
  * break time to the length of the exam.
  * 
  */ 
  private void InsertExam(FinalExamDay fed, CompressedClassTime ct, 
      int startTime, int endTime)
  {
      FinalExam fe = new FinalExam(ct);
     // Debug.WriteLine("Class start hour " + ct.GetClassTimeStartHour() * 100);
      fe.SetStartTime(startTime);
      fe.SetEndTime(endTime);
      fed.InsertExam(fe);
      //debugging info
      //Debug.WriteLine("Day: " + fed.GetDay().ToString() + " " 
      //    + fed.GetNumberOfExams());
  }