src/main/java/seedu/address/manager/EdgeManager.java
public static void assignStudentToCourse(ID studentID, ID courseID) throws CommandException {
        Course foundCourse = (Course) model.get(courseID, Constants.ENTITY_TYPE.COURSE);
        Student foundStudent = (Student) model.get(studentID, Constants.ENTITY_TYPE.STUDENT);

        foundCourse.addStudent(studentID);
        foundStudent.addCourse(courseID);
        model.updateFilteredCourseList(model.PREDICATE_SHOW_ALL_COURSES);
        model.updateFilteredStudentList(model.PREDICATE_SHOW_ALL_STUDENTS);

        // todo: change this after merge details-view (with different factory strategy)
        model.set(foundCourse, foundCourse);
        model.set(foundStudent, foundStudent);
    }
// ========================== For Assigning of X TO Y =========================
For Assigning of X TO Y
For Assigning of X TO Y
public static void assignStudentToCourse(ID studentID, ID courseID) throws CommandException {
        Course foundCourse = (Course) model.get(courseID, Constants.ENTITY_TYPE.COURSE);
        Student foundStudent = (Student) model.get(studentID, Constants.ENTITY_TYPE.STUDENT);
        foundCourse.addStudent(studentID);
        foundStudent.addCourse(courseID);
        model.updateFilteredCourseList(model.PREDICATE_SHOW_ALL_COURSES);
        model.updateFilteredStudentList(model.PREDICATE_SHOW_ALL_STUDENTS);
        model.set(foundCourse, foundCourse);
        model.set(foundStudent, foundStudent);
    }
public static void assignStudentToCourse ( ID studentID , ID courseID ) throws CommandException { Course foundCourse = ( Course ) model . get ( courseID , Constants . ENTITY_TYPE . COURSE ) ; Student foundStudent = ( Student ) model . get ( studentID , Constants . ENTITY_TYPE . STUDENT ) ; foundCourse . addStudent ( studentID ) ; foundStudent . addCourse ( courseID ) ; model . updateFilteredCourseList ( model . PREDICATE_SHOW_ALL_COURSES ) ; model . updateFilteredStudentList ( model . PREDICATE_SHOW_ALL_STUDENTS ) ; model . set ( foundCourse , foundCourse ) ; model . set ( foundStudent , foundStudent ) ; }
For Assigning of X TO Y
For Assigning of X TO Y
// todo: change this after merge details-view (with different factory strategy)