package seedu.address.logic.commands;

import seedu.address.commons.core.Messages;
import seedu.address.commons.core.UnmodifiableObservableList;
import seedu.address.model.person.ReadOnlyPerson;
import seedu.address.model.person.UniquePersonList.PersonNotFoundException;

/**
 * Deletes a person identified using it's last displayed index from the address book.
 */
public class DeleteCommand extends Command {

    public static final String COMMAND_WORD = "delete";

    public static final String MESSAGE_USAGE = COMMAND_WORD
            + ": Deletes the person identified by the index number used in the last person listing.\n"
            + "Parameters: INDEX (must be a positive integer)\n"
            + "Example: " + COMMAND_WORD + " 1";

    public static final String MESSAGE_DELETE_PERSON_SUCCESS = "Deleted Person: %1$s";

    public final int targetIndex;

    public DeleteCommand(int targetIndex) {
        this.targetIndex = targetIndex;
    }


    @Override
    public CommandResult execute() {

        UnmodifiableObservableList<ReadOnlyPerson> lastShownList = model.getFilteredPersonList();

        if (lastShownList.size() < targetIndex) {
            indicateAttemptToExecuteIncorrectCommand();
            return new CommandResult(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);
        }

        ReadOnlyPerson personToDelete = lastShownList.get(targetIndex - 1);

        try {
            model.deletePerson(personToDelete);
        } catch (PersonNotFoundException pnfe) {
            assert false : "The target person cannot be missing";
        }

        return new CommandResult(String.format(MESSAGE_DELETE_PERSON_SUCCESS, personToDelete));
    }

}

@@ -239,22 +239,20 @@
 sonList.
-Person
+Task
 NotFound
@@ -280,22 +280,20 @@
 letes a 
-person
+task
  identif
@@ -341,20 +341,20 @@
 the 
-address book
+task manager
 .%0A *
@@ -547,22 +547,20 @@
 tes the 
-person
+task
  identif
@@ -600,22 +600,20 @@
 he last 
-person
+task
  listing
@@ -770,38 +770,36 @@
  MESSAGE_DELETE_
-PERSON
+TASK
 _SUCCESS = %22Dele
@@ -802,22 +802,20 @@
 Deleted 
-Person
+Task
 : %251$s%22;
@@ -1262,22 +1262,20 @@
 INVALID_
-PERSON
+TASK
 _DISPLAY
@@ -1319,22 +1319,20 @@
 yPerson 
-person
+task
 ToDelete
@@ -1413,21 +1413,17 @@
 lete
-Person(person
+Task(task
 ToDe
@@ -1446,22 +1446,20 @@
  catch (
-Person
+Task
 NotFound
@@ -1515,22 +1515,20 @@
  target 
-person
+task
  cannot 
@@ -1617,14 +1617,12 @@
 ETE_
-PERSON
+TASK
 _SUC
@@ -1627,22 +1627,20 @@
 UCCESS, 
-person
+task
 ToDelete

Change occurrence of person to tasks in deleteCommand class