//Constructors: public ClassRoom(Students[] students, Teachers[] teachers, string id) { this.students = new List<Students>(students); this.teachers = new List<Teachers>(teachers); this.Identifier = identifier; this.comments = new List<string>(); }
static void Main(string[] args) { Students student1 = new Students("Hulio", 14 ); Students student2 = new Students("Fabio", 14); Students student3 = new Students("Gangnam", 14 ); Students student4 = new Students("Oktavio", 14); Students student5 = new Students("Marko", 14); Students[] students = new Students[] { student1, student2, student3 , student4, student5 }; Disciplines displine1 = new Disciplines("History",30,30); Disciplines displine2 = new Disciplines("Biology", 30, 30); Disciplines displine3= new Disciplines("Algebra", 30, 30); Disciplines displine4 = new Disciplines("CivilEngeneering", 30, 30); Disciplines displine5 = new Disciplines("Programming", 30, 30); Teachers teacher1 = new Teachers("Vili Vucov", new Disciplines[] { displine1, displine2,displine3,displine4,displine5 }); Teachers teacher2 = new Teachers("Samuel Jackson", new Disciplines[] { displine1, displine2, displine3, displine4, displine5 }); Teachers teacher3 = new Teachers("Bill Gates", new Disciplines[] { displine1, displine2, displine3, displine4, displine5 }); Teachers[] teachers = new Teachers[] { teacher1, teacher2, teacher3 }; ClassRoom class1 = new ClassRoom(students, teachers, "8B"); Console.WriteLine("The discipline is: " + class1.Teachers[2].Disciplines[2].Name); Console.WriteLine("The teacher is: " + class1.Teachers[2].Name); //Adding a comment student1.AddComment("Banana"); Console.WriteLine("Comment of a student: " + student1.Comments[0]); }
public void RemoveStudent(Students student) { this.students.Remove(student); }
//Methods: public void AddStudent(Students student) { this.students.Add(student); }