src/main/java/seedu/address/logic/parser/parserEdit/EditCourseCommandParser.java
public EditCourseCommand parse(String args) throws ParseException {
        requireNonNull(args);
        ArgumentMultimap argMultimap =
                ArgumentTokenizer.tokenize(args, PREFIX_NAME, PREFIX_AMOUNT, PREFIX_TAG);

        ID id;

        try {
            id = ParserUtil.parseID(argMultimap.getPreamble());
        } catch (ParseException pe) {
            throw new ParseException(
                    String.format(MESSAGE_INVALID_COMMAND_FORMAT, EditCourseCommand.MESSAGE_USAGE), pe);
        }

        EditCourseDescriptor editCourseDescriptor = new EditCourseDescriptor();
        if (argMultimap.getValue(PREFIX_NAME).isPresent()) {
            editCourseDescriptor.setName(ParserUtil.parseName(argMultimap.getValue(PREFIX_NAME).get()));
        }
        if (argMultimap.getValue(PREFIX_AMOUNT).isPresent()) {
            editCourseDescriptor.setAmount(ParserUtil.parseAmount(argMultimap.getValue(PREFIX_AMOUNT).get()));
        }

        parseTagsForEdit(argMultimap.getAllValues(PREFIX_TAG)).ifPresent(editCourseDescriptor::setTags);

        if (!editCourseDescriptor.isAnyFieldEdited()) {
            throw new ParseException(EditCourseCommand.MESSAGE_NOT_EDITED);
        }

        return new EditCourseCommand(id, editCourseDescriptor);
    }
/**
     * Parses the given {@code String} of arguments in the context of the EditCommand and returns an
     * EditCommand object for execution.
     *
     * @throws ParseException if the user input does not conform the expected format
     */
Parses the given  String of arguments in the context of the EditCommand and returns an
EditCommand object for execution.

@throws ParseException if the user input does not conform the expected format
Parses the given String of arguments in the context of the EditCommand and returns an EditCommand object for execution . @throws ParseException if the user input does not conform the expected format
public EditCourseCommand parse(String args) throws ParseException {
        requireNonNull(args);
        ArgumentMultimap argMultimap =
                ArgumentTokenizer.tokenize(args, PREFIX_NAME, PREFIX_AMOUNT, PREFIX_TAG);
        ID id;
        try {
            id = ParserUtil.parseID(argMultimap.getPreamble());
        } catch (ParseException pe) {
            throw new ParseException(
                    String.format(MESSAGE_INVALID_COMMAND_FORMAT, EditCourseCommand.MESSAGE_USAGE), pe);
        }
        EditCourseDescriptor editCourseDescriptor = new EditCourseDescriptor();
        if (argMultimap.getValue(PREFIX_NAME).isPresent()) {
            editCourseDescriptor.setName(ParserUtil.parseName(argMultimap.getValue(PREFIX_NAME).get()));
        }
        if (argMultimap.getValue(PREFIX_AMOUNT).isPresent()) {
            editCourseDescriptor.setAmount(ParserUtil.parseAmount(argMultimap.getValue(PREFIX_AMOUNT).get()));
        }
        parseTagsForEdit(argMultimap.getAllValues(PREFIX_TAG)).ifPresent(editCourseDescriptor::setTags);
        if (!editCourseDescriptor.isAnyFieldEdited()) {
            throw new ParseException(EditCourseCommand.MESSAGE_NOT_EDITED);
        }
        return new EditCourseCommand(id, editCourseDescriptor);
    }
public EditCourseCommand parse ( String args ) throws ParseException { requireNonNull ( args ) ; ArgumentMultimap argMultimap = ArgumentTokenizer . tokenize ( args , PREFIX_NAME , PREFIX_AMOUNT , PREFIX_TAG ) ; ID id ; try { id = ParserUtil . parseID ( argMultimap . getPreamble ( ) ) ; } catch ( ParseException pe ) { throw new ParseException ( String . format ( MESSAGE_INVALID_COMMAND_FORMAT , EditCourseCommand . MESSAGE_USAGE ) , pe ) ; } EditCourseDescriptor editCourseDescriptor = new EditCourseDescriptor ( ) ; if ( argMultimap . getValue ( PREFIX_NAME ) . isPresent ( ) ) { editCourseDescriptor . setName ( ParserUtil . parseName ( argMultimap . getValue ( PREFIX_NAME ) . get ( ) ) ) ; } if ( argMultimap . getValue ( PREFIX_AMOUNT ) . isPresent ( ) ) { editCourseDescriptor . setAmount ( ParserUtil . parseAmount ( argMultimap . getValue ( PREFIX_AMOUNT ) . get ( ) ) ) ; } parseTagsForEdit ( argMultimap . getAllValues ( PREFIX_TAG ) ) . ifPresent ( editCourseDescriptor :: setTags ) ; if ( ! editCourseDescriptor . isAnyFieldEdited ( ) ) { throw new ParseException ( EditCourseCommand . MESSAGE_NOT_EDITED ) ; } return new EditCourseCommand ( id , editCourseDescriptor ) ; }
Parses the given {@code String} of arguments in the context of the EditCommand and returns an
 EditCommand object for execution.
Parses the given { @code String } of arguments in the context of the EditCommand and returns an EditCommand object for execution .