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