package seedu.geekeep.logic.commands;

import seedu.geekeep.commons.core.Messages;
import seedu.geekeep.logic.commands.exceptions.CommandException;
import seedu.geekeep.model.Model;

/**
 * Represents a command with hidden internal logic and the ability to be executed.
 */
public abstract class Command {
    protected Model model;

    /**
     * Constructs a feedback message to summarise an operation that displayed a listing of tasks.
     *
     * @param displaySize used to generate summary
     * @return summary message for tasks displayed
     */
    public static String getMessageForTaskListShownSummary(int displaySize) {
        return String.format(Messages.MESSAGE_TASKS_LISTED_OVERVIEW, displaySize);
    }

    /**
     * Executes the command and returns the result message.
     *
     * @return feedback message of the operation result for display
     * @throws CommandException If an error occurs during command execution.
     */
    public abstract CommandResult execute() throws CommandException;

    /**
     * Provides any needed dependencies to the command.
     * Commands making use of any of these should override this method to gain
     * access to the dependencies.
     */
    public void setData(Model model) {
        this.model = model;
    }
}

@@ -299,16 +299,50 @@
 mmand %7B%0A
+    protected String commandText;%0A
     prot
@@ -1050,16 +1050,213 @@
 ption;%0A%0A
+    public void updateCommandHistory() %7B%0A        model.updateCommandHistory(commandText);%0A    %7D%0A%0A    public void setCommandText(String commandText) %7B%0A        this.commandText = commandText;%0A    %7D%0A%0A
     /**%0A

Add updateCommandHistory and setCommandText in Command