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][M11-3]Lim Wan Ching #31

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

Conversation

wanchinglim
Copy link

No description provided.

@dannong
Copy link

dannong commented Feb 10, 2019

code is easy to understand, interesting add of new command, saves the user time from typing an extra "list" command since the address book will be listed after a new addition of contact.

Copy link

@devamanyu devamanyu left a comment

Choose a reason for hiding this comment

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

Useful PR to print updated persons list as and when new persons are added.

Note: Proper format to write commit messages : write the summary line and description of what you have done in the imperative mode, that is as if you were commanding someone. Start the line with "Fix", "Add", "Change" instead of "Fixed", "Added", "Changed".

Kindly look at the comments for some possibilities of improvement. Please close this PR after reading them.

|| 2. Betsy Choo Tags: [secretive]
|| 3. Dickson Ee Phone: 444444 Address: 444, delta street Tags: [friends]
|| 4. Esther Potato Phone: 555555 Email: [email protected] Tags: [tubers][starchy]
||

Choose a reason for hiding this comment

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

Good to see that tests have been updated.

@@ -60,6 +60,8 @@ Put a `p` before the phone / email / address prefixes to mark it as `private`. `
be seen using the `viewall` command.

Persons can have any number of tags (including 0).

A list of the updated Address Book will be displayed after a person is successfully added.

Choose a reason for hiding this comment

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

Good job in updating the user guide.

@@ -66,7 +67,9 @@ public ReadOnlyPerson getPerson() {
public CommandResult execute() {
try {
addressBook.addPerson(toAdd);
return new CommandResult(String.format(MESSAGE_SUCCESS, toAdd));
List<ReadOnlyPerson> allPersons = addressBook.getAllPersons().immutableListView();
System.out.println(String.format(MESSAGE_SUCCESS, toAdd) + "\n\nUpdated Address Book:");

Choose a reason for hiding this comment

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

Although this code gets the job done, it violates certain principles of software engineering. Try to refactor the code to ensure SLAP and SRP is maintained.

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