Exemple #1
0
 public void AddWeakStudent(WeakStudent student)
 {
     if (student != null)
     {
         this.students.Add(student);
     }
     else
     {
         throw new ArgumentNullException("Added student cannot be null.");
     }
 }
Exemple #2
0
        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;
                }
            }
        }
Exemple #3
0
 public void Update(WeakStudent student)
 {
     Console.WriteLine("Name: {0}, Gread: {1}", student.Name, student.Grade);
     Console.WriteLine("Marks: {0}", string.Join(", ", student.Marks));
 }