src/main/java/seedu/address/logic/commands/commandAssign/AssignStudentToCourseCommand.java
@Override
    protected CommandResult executeUndoableCommand(Model model) throws CommandException {
        // Check whether both IDs even exists
        ID courseID = this.assignDescriptor.getAssignID(PREFIX_COURSEID);
        ID studentID = this.assignDescriptor.getAssignID(PREFIX_STUDENTID);

        Course assignedCourse = (Course) model.get(courseID, Constants.ENTITY_TYPE.COURSE);
        Student assigningStudent = (Student) model.get(studentID, Constants.ENTITY_TYPE.STUDENT);

        if (this.undoProgresses != null) {
            ProgressManager.addUndoProgress(this.undoProgresses);
        } else {
            ProgressManager.addAllProgressesToOneStudent(courseID, studentID);
        }

        EdgeManager.assignStudentToCourse(studentID, courseID);

        return new CommandResult(String.format(MESSAGE_SUCCESS,
                assigningStudent.getName(), studentID.value,
                assignedCourse.getName(), courseID.value));
    }
/**
     * Executes the AssignStudentToCourse command by calling EdgeManager and Progress Manager
     *
     * @param model
     * @return A successful commandResult
     * @throws CommandException
     */
Executes the AssignStudentToCourse command by calling EdgeManager and Progress Manager
@param model
@return A successful commandResult
@throws CommandException
Executes the AssignStudentToCourse command by calling EdgeManager and Progress Manager @param model @return A successful commandResult @throws CommandException
@Override
    protected CommandResult executeUndoableCommand(Model model) throws CommandException {
        ID courseID = this.assignDescriptor.getAssignID(PREFIX_COURSEID);
        ID studentID = this.assignDescriptor.getAssignID(PREFIX_STUDENTID);
        Course assignedCourse = (Course) model.get(courseID, Constants.ENTITY_TYPE.COURSE);
        Student assigningStudent = (Student) model.get(studentID, Constants.ENTITY_TYPE.STUDENT);
        if (this.undoProgresses != null) {
            ProgressManager.addUndoProgress(this.undoProgresses);
        } else {
            ProgressManager.addAllProgressesToOneStudent(courseID, studentID);
        }
        EdgeManager.assignStudentToCourse(studentID, courseID);
        return new CommandResult(String.format(MESSAGE_SUCCESS,
                assigningStudent.getName(), studentID.value,
                assignedCourse.getName(), courseID.value));
    }
@ Override protected CommandResult executeUndoableCommand ( Model model ) throws CommandException { ID courseID = this . assignDescriptor . getAssignID ( PREFIX_COURSEID ) ; ID studentID = this . assignDescriptor . getAssignID ( PREFIX_STUDENTID ) ; Course assignedCourse = ( Course ) model . get ( courseID , Constants . ENTITY_TYPE . COURSE ) ; Student assigningStudent = ( Student ) model . get ( studentID , Constants . ENTITY_TYPE . STUDENT ) ; if ( this . undoProgresses != null ) { ProgressManager . addUndoProgress ( this . undoProgresses ) ; } else { ProgressManager . addAllProgressesToOneStudent ( courseID , studentID ) ; } EdgeManager . assignStudentToCourse ( studentID , courseID ) ; return new CommandResult ( String . format ( MESSAGE_SUCCESS , assigningStudent . getName ( ) , studentID . value , assignedCourse . getName ( ) , courseID . value ) ) ; }
Executes the AssignStudentToCourse command by calling EdgeManager and Progress Manager
 @param model
 @return A successful commandResult
 @throws CommandException
Executes the AssignStudentToCourse command by calling EdgeManager and Progress Manager @param model @return A successful commandResult @throws CommandException
// Check whether both IDs even exists