package seedu.address.logic.commands;

public class UndoCommand extends Command {

    public static final String COMMAND_WORD = "undo";
    public static final String MESSAGE_USAGE = COMMAND_WORD;
    public static final String MESSAGE_SUCCESS = "Successfully undo previous change";
    public static final String MESSAGE_NO_CHANGE = "No change to be undone";

    /**
     * Default empty constructor.
     */
    public UndoCommand() {
    }

    public CommandResult execute() {
        if (!model.getFlag().equals("undo copy")) {
            return new CommandResult(MESSAGE_NO_CHANGE);
        } else {
            model.resetData(model.getCopy());
            model.updateFlag("empty copy");
            return new CommandResult(MESSAGE_SUCCESS);
        }
    }
}

@@ -32,16 +32,57 @@
 mands;%0A%0A
+import seedu.address.model.TaskManager;%0A%0A
 public c
@@ -643,16 +643,88 @@
  else %7B%0A
+            TaskManager temp = new TaskManager(model.getTaskManager());%0A
         
@@ -795,19 +795,54 @@
 ag(%22
-empty copy%22
+redo copy%22);%0A            model.updateCopy(temp
 );%0A 

Modify undo command to support redo command