Ejemplo n.º 1
0
 public Class(string uniqueClassID, Teacher[] teachers, Student[] students)
 {
     this.utid = uniqueClassID;
     setOfTeachers = new List<Teacher>();
     setOfStudents = new List<Student>();
     foreach (var item in teachers)
     {
         this.AddTeacher(item);
     }
     foreach (var item in students)
     {
         this.AddStudent(item);
     }
 }
Ejemplo n.º 2
0
 public void AddTeacher(Teacher teacher)
 {
     if (!setOfTeachers.Contains(teacher))
         setOfTeachers.Add(teacher);
     else
     {
         throw new ArgumentException("Teacher is already here");
     }
 }
Ejemplo n.º 3
0
 public void RemoveTeacher(Teacher teacher)
 {
     setOfTeachers.Remove(teacher);
 }