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

[T2A4][T11-A3]Pengcheng-an #14

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

Conversation

pengchengan
Copy link

No description provided.

@pengchengan
Copy link
Author

T2A3 Exercise 1 and 2

@pengchengan
Copy link
Author

Ready to view

@pengchengan pengchengan reopened this Jan 24, 2017
@pengchengan pengchengan changed the title [T2A2][W02-]Pengcheng-an [T2A3][W02-]Pengcheng-an Jan 24, 2017
@pengchengan pengchengan changed the title [T2A3][W02-]Pengcheng-an [T2A2][W02-]Pengcheng-an Jan 24, 2017
@pengchengan pengchengan changed the title [T2A2][W02-]Pengcheng-an [T2A3][W02-]Pengcheng-an Jan 24, 2017
@pengchengan pengchengan changed the title [T2A3][W02-]Pengcheng-an [T2A3][T11A3]Pengcheng-an Jan 26, 2017
@pengchengan pengchengan changed the title [T2A3][T11A3]Pengcheng-an [T2A3][T11-A3]Pengcheng-an Jan 26, 2017
Copy link

@ZawadulFarhan ZawadulFarhan left a comment

Choose a reason for hiding this comment

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

Good job on completing the activity. I believe this is wrongly labelled and should be T2A4. Try to keep the commits of each activity to one branch so that the commits from another activity do not overlap. When making a new branch for a new activity, return to master first so that it does not end up as a branch of another branch.

loadDataFromStorage();
while (true) {
String userCommand = getUserInput();
String userCommand = getUserInput();

Choose a reason for hiding this comment

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

There's an indentation error here. Our coding standard requires 4 spaces.

@@ -209,9 +213,10 @@
public static void main(String[] args) {
showWelcomeMessage();
processProgramArgs(args);

Choose a reason for hiding this comment

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

Try not to add new lines unnecessarily unless it forms a logical break or improves readability.

@@ -388,7 +395,9 @@ private static String executeCommand(String userInputString) {
}
}

/**


Choose a reason for hiding this comment

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

These new lines are unnecessary.

}
Collection<String> keywordsLowerCase=new HashSet<String>();
for (String s : keywords) {
String temp=s.toLowerCase();

Choose a reason for hiding this comment

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

An indentation error here.

}
});
showToUser(toBeDisplayed);
return getMessageForPersonsDisplayedSummary(toBeDisplayed);

Choose a reason for hiding this comment

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

The last 3 lines appear to be indented one extra space.

* T2A4
* Displays all persons in the address book to the user; in alphabetical order.
* comparator http://stackoverflow.com/questions/4699807/sort-arraylist-of-array-in-java
* @return feedback display message for the operation result

Choose a reason for hiding this comment

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

There should an empty line between your description and your tags. Review the javadoc standards.

@@ -115,6 +117,8 @@
private static final String COMMAND_LIST_DESC = "Displays all persons as a list with index numbers.";
private static final String COMMAND_LIST_EXAMPLE = COMMAND_LIST_WORD;

private static final String COMMAND_SORT_WORD = "sort";

Choose a reason for hiding this comment

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

You'd notice that the the lines here follow a pattern. Good job on naming the variable in a similar fashion. You can consider adding desc and example variables and completing the help command to be updated with the sort command.

for (String s : keywords) {
String temp=s.toLowerCase();
keywordsLowerCase.add(temp);
}

Choose a reason for hiding this comment

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

There is a pattern that you followed in changing the string to lower case. You can use this opportunity to abstract this into a method.

@pengchengan pengchengan changed the title [T2A3][T11-A3]Pengcheng-an [T2A4][T11-A3]Pengcheng-an Jan 30, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants