package seedu.address.logic.commands;

import seedu.address.commons.core.Messages;
import seedu.address.logic.commands.exceptions.CommandException;
import seedu.address.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;
    }
}

@@ -174,16 +174,155 @@
 l.Model;
+%0Aimport seedu.address.model.tag.UniqueTagList.DuplicateTagException;%0Aimport seedu.address.model.task.UniqueTaskList.DuplicateTaskException;
 %0A%0A/**%0A *
@@ -1077,16 +1077,93 @@
 cution.%0A
+     * @throws DuplicateTaskException %0A     * @throws DuplicateTagException %0A
      */%0A

Update Command.java