@Override
  public void updateCourse(int courseId, String courseCode, String courseName) {

    Course course = courseDao.getCourse(courseId);
    course.setCourseCode(courseCode);
    course.setName(courseName);
    // updateCourse Could b used
    courseDao.saveCourse(course);
  }
  public boolean checkDegreeCriteria(
      Collection<Course> courseInDegree, Collection<Course> courseInStudent) {

    int course_id = 0;
    boolean isCouseEnrolled = false;
    for (Course degreeCourse : courseInDegree) {

      isCouseEnrolled = false;
      course_id = degreeCourse.getId();
      for (Course studentCourse : courseInStudent) {
        if (course_id == studentCourse.getId()) {

          isCouseEnrolled = true;
        }
      }

      if (!isCouseEnrolled) return false;
    }

    return true;
  }