Exemplo n.º 1
0
 public void Enroll(Course course)
 {
     if ( ! Courses.Exists(c => c.Course == course))
     {
         CourseParticipation participation = new CourseParticipation(course);
         Courses.Add(participation);
     }
 }
Exemplo n.º 2
0
 public void GiveGrade(Course course, int grade)
 {
     CourseParticipation participation = Courses.Find(c => c.Course == course);
     participation.Grade = grade;
     if (grade > 0)
         participation.IsPassed = true;
 }
Exemplo n.º 3
0
 public CourseParticipation(Course course)
 {
     this.course = course;
 }
Exemplo n.º 4
0
 public void GiveGrade(Course course, bool isPassed)
 {
     CourseParticipation participation = Courses.Find(c => c.Course == course);
     participation.IsPassed = isPassed;
 }