@@ -0,0 +1,2344 @@
+package seedu.address.logic.commands;%0A%0Aimport seedu.address.commons.core.Messages;%0Aimport seedu.address.commons.exceptions.IllegalValueException;%0Aimport seedu.address.model.task.FloatingTask;%0Aimport seedu.address.model.task.Name;%0Aimport seedu.address.model.task.Priority;%0A%0Apublic class EditFloatingTaskCommand extends Command %7B%0A%0A    public static final String COMMAND_WORD = %22edit-task%22;%0A%0A    public static final String MESSAGE_USAGE = COMMAND_WORD%0A            + %22: Edits the floating task identified by the index number used in the filtered floating task listing.%5Cn%22%0A            + %22Parameters: INDEX %5Bn-NAME%5D %5Bp-PRIORITY%5D%22%0A            + %22Example: %22 + COMMAND_WORD + %22 1 p-2%22;%0A%0A    public static final String MESSAGE_EDIT_TASK_SUCCESS = %22Floting task edited: %251$s%22;%0A%0A    public final int targetIndex;%0A%0A    public final Name newName;%0A%0A    public final Priority newPriority;%0A%0A    public EditFloatingTaskCommand(int targetIndex, String newName, String newPriority) throws IllegalValueException %7B%0A        this.targetIndex = targetIndex;%0A        this.newName = newName != null ? new Name(newName) : null;%0A        this.newPriority = newPriority != null ? new Priority(newPriority) : null;%0A    %7D%0A%0A    public int getTargetIndex() %7B%0A        return targetIndex;%0A    %7D%0A%0A    public Name getNewName() %7B%0A        return this.newName;%0A    %7D%0A%0A    public Priority getNewPriority() %7B%0A        return this.newPriority;%0A    %7D%0A%0A    @Override%0A    public CommandResult execute() %7B%0A        FloatingTask oldFloatingTask;%0A        try %7B%0A            oldFloatingTask = model.getFloatingTask(targetIndex - 1);%0A        %7D catch (IllegalValueException e) %7B%0A            indicateAttemptToExecuteIncorrectCommand();%0A            return new CommandResult(Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);%0A        %7D%0A%0A        FloatingTask newFloatingTask;%0A%0A        newFloatingTask = new FloatingTask(%0A                newName != null ? newName : oldFloatingTask.name,%0A                newPriority != null ? newPriority : oldFloatingTask.getPriority()%0A        );%0A%0A        try %7B%0A            model.setFloatingTask(targetIndex - 1, newFloatingTask);%0A        %7D catch (IllegalValueException e) %7B%0A            throw new AssertionError(%22The target floating task cannot be missing%22, e);%0A        %7D%0A%0A        return new CommandResult(String.format(MESSAGE_EDIT_TASK_SUCCESS, newFloatingTask));%0A    %7D%0A%0A%7D%0A

implement EditFloatingTaskCommand