package seedu.tasklist.logic.commands;

import seedu.tasklist.logic.commands.exceptions.CommandException;

public class SortCommand extends Command{
    
    public static final String COMMAND_WORD = "sort";
    private final String parameter;

    public static final String MESSAGE_USAGE = COMMAND_WORD
            + ":Sorts task according to the parameter specified. Only 1 of the 4. Name:n"
            + "Priority:p or StartDate: sd or EndDate:ed\n"
            + "Parameters: n, p, sd, ed\n"
            + "Example: " + COMMAND_WORD + "n";

    
    public SortCommand(String parameter) {
        this.parameter = parameter;
    }

    @Override
    public CommandResult execute() throws CommandException {
       
        return null;
    }

}

@@ -37,74 +37,8 @@
 s;%0A%0A
-import seedu.tasklist.logic.commands.exceptions.CommandException;%0A
 %0Apub
@@ -315,9 +315,9 @@
 the 
-4
+5
 . Na
@@ -378,16 +378,30 @@
 dDate:ed
+ or Deadline:d
 %5Cn%22%0A    
@@ -487,207 +487,989 @@
  + %22
+ 
 n%22;%0A
-%0A    %0A    public SortCommand(String parameter) %7B%0A        this.parameter = parameter;%0A    %7D%0A%0A    @Override%0A    public CommandResult execute() throws CommandException %7B%0A       %0A        return null;
+    public static final String MESSAGE_FAILURE = %22Invalid sorting parameter used!%22 + MESSAGE_USAGE;%0A    public static final String MESSAGE_SUCCESS = %22Task sorted according to given parameter.%22;%0A    %0A    public SortCommand(String parameter) %7B%0A        switch (parameter) %7B%0A        case %22d%22:%0A            this.parameter = %22Deadline%22;%0A            break;%0A        case %22sd%22:%0A            this.parameter = %22Start Date%22;%0A            break;%0A        case %22ed%22:%0A            this.parameter = %22End Date%22;%0A            break;%0A        case %22n%22:%0A            this.parameter = %22Name%22;%0A            break;%0A        case %22p%22:%0A            this.parameter = %22Priority%22;%0A            break;%0A        default:%0A            this.parameter = null;%0A        %7D%0A    %7D%0A%0A    @Override%0A    public CommandResult execute() %7B%0A       %0A        if(parameter == null) %7B%0A            return new CommandResult(MESSAGE_FAILURE);%0A        %7D%0A        model.sortTaskList(parameter);%0A        return new CommandResult(MESSAGE_SUCCESS); 
 %0A   

Update SortCommand.java