//Constructors
 public SchoolClass(Student[] students, Teacher[] teachers, string id)
 {
     this.students = new List<Student>(students);
     this.teachers = new List<Teacher>(teachers);
     this.id = id;
     this.comments = new List<string>();
 }
示例#2
0
        static void Main()
        {
            Student i = new Student("Ivancho", 1);
            Student a = new Student("Ani", 2);
            Student v = new Student("Vader", 3);
            Student h = new Student("Homer", 4);

            Teacher p = new Teacher("Petkan");
            p.Discipline = Disciplines.Biology.ToString();
            Teacher m = new Teacher("Mony");
            p.Discipline = Disciplines.Math.ToString();

            Teacher[] teachers = new Teacher[] {p, m};
            Student [] students = new Student[] {i, a, v, h};
            SchoolClass firstA = new SchoolClass(students, teachers, "First A");

            Discipline OOP = new Discipline();
            OOP.AddComment("Great!");
        }
 public void RemoveTeacher(Teacher teacher)
 {
     this.teachers.Remove(teacher);
 }
 public void AddTeacher(Teacher teacher)
 {
     this.teachers.Add(teacher);
 }