@@ -0,0 +1,1715 @@
+package seedu.manager.logic.commands;%0A%0A/**%0A * Redo a previous undo command.%0A */%0A//@@author A0144881Y%0Apublic class RedoCommand extends Command %7B%0A%09%0A    public static final String COMMAND_WORD = %22redo%22;%0A%0A    public static final String USAGE = %22redo%5Cn%22 + %22redo NUMBER_OF_TIMES%22;%0A%0A    public static final String EXAMPLES = %22redo%5Cn%22 + %22redo 2%22;%0A    %0A    public static final String MESSAGE_USAGE = COMMAND_WORD + %22: Can only be used right after undo commands, to revert the to-do list to the state before undo.%5Cn%22%0A              + %22%5CnUsage:%5Cnredo %5BNUMBER_OF_COMMANDS%5D%5Cn%22;%0A%0A    public static final String MESSAGE_SUCCESS = %22Reverted to later state. (%25d commands redone)%22;%0A    %0A    public static final String MESSAGE_INDEX_LARGER_THAN_MAX = %22Nothing left to redo. You are at the latest state.%22;%0A    %0A    public static final String MESSAGE_OFFSET_OUT_OF_BOUNDS = %22Insufficient number of commands to perform redo operation. You can redo maximum %25d times.%22;%0A    %0A    private int offset = 0;%0A%09%0A    %0A    public RedoCommand() %7B%0A        offset = 1;%0A    %7D%0A    %0A    public RedoCommand(int newOffset) %7B%0A        offset = newOffset;%0A    %7D%0A    %0A    @Override%0A    public CommandResult execute() %7B%0A        assert model != null;%0A        if (model.getHistoryIndex() %3E= model.getMaxHistoryIndex()) %7B%0A            return new CommandResult(MESSAGE_INDEX_LARGER_THAN_MAX);%0A        %7D else if (model.getHistoryIndex() + offset %3E model.getMaxHistoryIndex()) %7B%0A            return new CommandResult(String.format(MESSAGE_OFFSET_OUT_OF_BOUNDS, model.getMaxHistoryIndex() - model.getHistoryIndex()));%0A        %7D else %7B%0A            model.redoCommand(offset);%0A            return new CommandResult(String.format(MESSAGE_SUCCESS, offset));%0A        %7D%0A    %7D%0A%0A%7D%0A

Add redo command