예제 #1
0
 //constructor
 public classItem(CourseTime CourseTimes, Teacher Teacher, List<Student> EnrolledStudents, Classroom Room, Cours Course)
 {
     courseTimes = CourseTimes;
     teacher = Teacher;
     enrolledStudents = EnrolledStudents;
     room = Room;
     course = Course;
 }
예제 #2
0
 //displays classroom information
 public static void displayClassroomInfo(Classroom c)
 {
     Console.WriteLine("ID: {0}, Room number: {1}, Room size: {2}", c.ClassroomID, c.RoomNumber, c.RoomSize);
     Console.WriteLine("Information regarding courses scheduled in this room:");
     bool classWasScheduled = false;
     foreach(classItem ci in scheduledClasses)
     {
         if (c.ClassroomID.Equals(ci.Room.ClassroomID))
         {
             Console.WriteLine("\tCourse name: {0}\n\tTeacher name: {1}\n\tNumber of students enrolled: {2}", ci.Course.CourseName, ci.Teacher.Name, ci.EnrolledStudents.Count);
             classWasScheduled = true;
         }
     }
     if (classWasScheduled == false)
     {
         Console.WriteLine("No courses have been scheduled in this room");
     }
 }