package seedu.emeraldo.logic.commands;

import seedu.emeraldo.commons.exceptions.IllegalValueException;

public class EditCommand extends Command{
    
    public static final String COMMAND_WORD = "edit";

    public static final String MESSAGE_USAGE = COMMAND_WORD            
            + ": Edits the task identified by the index number used in the last tasks listing.\n"
            + "Parameters: INDEX (must be a positive integer) and \"TASK_DESCRIPTION\"\n"
            + "Example: " + COMMAND_WORD + " 1" + "CS2103T Week 8 Tutorial";
   
    public static final String MESSAGE_EDIT_TASK_SUCCESS = "Edited task: %1$s";
    
    public final int targetIndex;
    
    public final String field;
    
    public EditCommand(String targetIndex, String field) throws IllegalValueException {
        this.targetIndex = Integer.parseInt(targetIndex);
        this.field = field;
    }
    
    @Override
    public CommandResult execute() {
        // TODO Auto-generated method stub
        return null;
    }

}

@@ -67,31 +67,257 @@
 ons.
-exceptions.IllegalValue
+core.Messages;%0Aimport seedu.emeraldo.commons.core.UnmodifiableObservableList;%0Aimport seedu.emeraldo.commons.exceptions.IllegalValueException;%0Aimport seedu.emeraldo.model.task.ReadOnlyTask;%0Aimport seedu.emeraldo.model.task.UniqueTaskList.TaskNotFound
 Exce
@@ -1163,24 +1163,25 @@
 ute() %7B%0A
+%0A
         
 // TODO 
@@ -1176,63 +1176,632 @@
     
-// TODO Auto-generated method stub%0A        return null;
+UnmodifiableObservableList%3CReadOnlyTask%3E lastShownList = model.getFilteredTaskList();%0A%0A        if (lastShownList.size() %3C targetIndex) %7B%0A            indicateAttemptToExecuteIncorrectCommand();%0A            return new CommandResult(Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);%0A        %7D%0A%0A        ReadOnlyTask taskToEdit = lastShownList.get(targetIndex - 1);%0A%0A        try %7B%0A            model.editTask(taskToEdit);%0A        %7D catch (TaskNotFoundException pnfe) %7B%0A            assert false : %22The target task cannot be missing%22;%0A        %7D%0A%0A        return new CommandResult(String.format(MESSAGE_EDIT_TASK_SUCCESS, taskToEdit));%0A
 %0A   

Add execute in EditCommand