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

[W7][T11-2]WU PEI HSUAN #30

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

Conversation

WuPeiHsuan
Copy link

No description provided.

Copy link

@stephlewyh stephlewyh left a comment

Choose a reason for hiding this comment

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

Hi Cherrie,

Good effort here. You have done well in making the enhancement work, providing a unit test and updating the user guide accordingly.

Some points you could improve on:
(1) Supplementing test cases and a JUnit test for the actual sorting that your enhancement is doing. Checking that the command is typed correctly is insufficient.

(2) Empty lines - You are leaning toward violating the coding convention for inserting too many empty lines in your code.

You may close this PR after reviewing this comment.

+ "Example: " + COMMAND_WORD;


@Override

Choose a reason for hiding this comment

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

Missing header comment. All non-trivial methods should have java doc format header comments.

@Override
public CommandResult execute() {
addressBook.sorted();

Choose a reason for hiding this comment

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

Be aware that too many empty lines can be a coding violation.

* Sorts all persons from the address book.
*/

public void sorted() { allPersons.sort();}

Choose a reason for hiding this comment

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

The placement of your code is violating the coding convention. Please add logic on new line. Refer to java coding conventions for CS2113/T for more information.

@@ -106,13 +106,27 @@ public void remove(ReadOnlyPerson toRemove) throws PersonNotFoundException {
}
}

Choose a reason for hiding this comment

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

Again, we consider too many empty lines as a coding violation, as it reduces code readability.

@@ -58,6 +58,12 @@ public void listCommand_parsedCorrectly() {
parseAndAssertCommandType(input, ListCommand.class);
}

@Test

Choose a reason for hiding this comment

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

Missing header comment. All non-trivial methods should have java doc format header comments.

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.

3 participants