public void AddWeakStudent(WeakStudent student) { if (student != null) { this.students.Add(student); } else { throw new ArgumentNullException("Added student cannot be null."); } }
public IEnumerable<WeakStudent> FoundAllWeakStudents(Func<Student, bool> predicate) { foreach (var student in this.allStudents) { if (predicate(student)) { WeakStudent weakStudent = new WeakStudent(student.Name, student.Grade) { Marks = student.Marks, }; weakStudent.Attach(this.psychologist); yield return weakStudent; } } }
public void Update(WeakStudent student) { Console.WriteLine("Name: {0}, Gread: {1}", student.Name, student.Grade); Console.WriteLine("Marks: {0}", string.Join(", ", student.Marks)); }