Added comments of logic to addStudentToCourse method.