//@@author A0114395E
package seedu.address.model;

import seedu.address.logic.commands.*;

/**
 * Class to store an action, and it's inverse
 */
public class StateCommandPair {
    private Command executeCommand;
    private Command undoCommand;
    
    public StateCommandPair(Command cmd) {
        this.executeCommand = cmd;
        this.undoCommand = this.evaluateInverse(cmd);
    }
    
    /**
     * Executes the command previously entered (for redo)
     */
    public void execute() {
        System.out.println(executeCommand);
    }
    
    /**
     * Executes the inverse of the command previously entered (for undo)
     */
    public void executeInvese() {
        System.out.println(undoCommand);
    }
    
    /**
     * 
     * @param Command
     * @return an Inverse action of the Command
     */
    private Command evaluateInverse(Command cmd) {
        return cmd;// stub
    }
}

@@ -82,16 +82,81 @@
 mands.*;
+%0Aimport seedu.address.logic.commands.exceptions.CommandException;
 %0A%0A/**%0A *
@@ -340,32 +340,52 @@
 Pair(Command cmd
+, Command inverseCmd
 ) %7B%0A        this
@@ -438,33 +438,18 @@
 d = 
-this.evaluateI
+i
 nverse
-(c
+C
 md
-)
 ;%0A  
@@ -533,65 +533,108 @@
    *
-/%0A    public void execute() %7B%0A        System.out.println(
+ @throws CommandException %0A     */%0A    public void execute() throws CommandException %7B%0A        this.
 exec
@@ -639,24 +639,33 @@
 ecuteCommand
+.execute(
 );%0A    %7D%0A   
@@ -743,24 +743,57 @@
  (for undo)%0A
+     * @throws CommandException %0A
      */%0A    
@@ -824,233 +824,69 @@
 e() 
-%7B%0A        System.out.println(undoCommand);%0A    %7D%0A    %0A    /**%0A     * %0A     * @param Command%0A     * @return an Inverse action of the Command%0A     */%0A    private Command evaluateInverse(Command cmd) %7B%0A        return cmd;// stub
+throws CommandException %7B%0A        this.undoCommand.execute();
 %0A   

Replace stubs with command execution