Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[W5][W17-1]Chen Caijie #143

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Conversation

rbth7e5
Copy link

@rbth7e5 rbth7e5 commented Feb 12, 2019

currently only editing of a person's name is supported.

@rbth7e5 rbth7e5 changed the title add new command edit, supports name editing [W5][W17-1]Chen Caijie Feb 12, 2019
Copy link

@Wklee96 Wklee96 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I saw that you have included a catch for DuplicatePersonException inside EditCommand. Can I clarify under what situation will this exception be caught?

@rbth7e5
Copy link
Author

rbth7e5 commented Feb 12, 2019 via email

package seedu.addressbook.commands;

import seedu.addressbook.data.exception.IllegalValueException;
import seedu.addressbook.data.person.*;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Try to be explicit in your imports, avoiding the use of .*.

import seedu.addressbook.data.exception.IllegalValueException;
import seedu.addressbook.data.person.*;

public class EditCommand extends Command {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Including a javadoc comment for new classes would be good.

@@ -73,33 +78,36 @@ public Command parseCommand(String userInput) {

switch (commandWord) {

case AddCommand.COMMAND_WORD:
return prepareAdd(arguments);
case AddCommand.COMMAND_WORD:
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that the coding style specifies that there shouldn't be indentation for case clauses.

Copy link

@sharan8 sharan8 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Caijie, some comments:

  • Good that you updated the User Guide, I/O tests and JUnit tests.
  • Note the coding style requirements for switch-case statements - there shouldn't be indentations for case clauses. It would be helpful to configure your IDE accordingly.
  • Testing with valid input could be a good addition to your JUnit tests.
  • It would be helpful to check if you can handle the case where the name and new name inputs are the same, differently (E.g. Give the user a more personalised feedback message).
  • Good that you used a branch to implement this enhancement.
  • Think about whether you can break down your commits further such that each one corresponds to one incremental change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants