package seedu.tasklist.logic.parser;

import static seedu.tasklist.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;

import seedu.tasklist.logic.commands.Command;
import seedu.tasklist.logic.commands.IncorrectCommand;
import seedu.tasklist.logic.commands.LoadCommand;



/**
 * Parses input arguments and creates a new LoadCommand object
 */
public class LoadCommandParser {

    /**
     * Parses the given {@code String} of arguments in the context of the LoadCommand
     * and returns an LoadCommand object for execution.
     */
    public Command parse(String args) {
        final String[] path = args.trim().split("\\s+");
        if (path.length > 1 || path[0].isEmpty()) {
            return new IncorrectCommand(
                    String.format(MESSAGE_INVALID_COMMAND_FORMAT, LoadCommand.MESSAGE_USAGE));
        }
        return new LoadCommand(path[0]);
    }
}

@@ -373,16 +373,108 @@
 arser %7B%0A
+    public static final int CORRECT_LENGTH = 1;%0A    public static final int FILE_PATH = 0;%0A%0A
 %0A    /**
@@ -660,24 +660,25 @@
 ing args) %7B%0A
+%0A
         fina
@@ -722,16 +722,17 @@
 %5C%5Cs+%22);%0A
+%0A
         
@@ -753,19 +753,40 @@
 h %3E 
-1 %7C%7C path%5B0
+CORRECT_LENGTH %7C%7C path%5BFILE_PATH
 %5D.is
@@ -978,17 +978,25 @@
 nd(path%5B
-0
+FILE_PATH
 %5D);%0A    

Improve code quality