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

[T2A2][F14-A3]LiuYulin #294

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

Conversation

LiuYulin0629
Copy link

Ready for review

@nus-se-pr-bot
Copy link

Hi @LiuYulin0629, your pull request title is invalid. It should be in the format of [Activity ID][Team ID] Your name, where [Activity Id] has no dashes or spaces (e.g. [T2A3] stands for Tutorial 2 Activity 3) and [Team ID] has one dash only and no spaces (e.g. [W14-A2] means Wednesday 2pm (14 hrs), Phase A, Team 2). Please follow the instructions given strictly and edit your title for reprocessing.

Submit only one activity per pull request (unless otherwise stated in instructions) and do remember to create your branches from the commit where the master branch is pointing at so that each PR you submit only consist of commits meant for the activity.

Note: this comment is posted by a bot. If you believe this is done in error, please create an issue at cs2103-pr-bot and add a link to this PR.

@LiuYulin0629 LiuYulin0629 changed the title [T2A2][T05-03]LiuYulin [T2A2][F14-A3]LiuYulin Feb 2, 2017
Copy link

@chanjunweimy chanjunweimy left a comment

Choose a reason for hiding this comment

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

@LiuYulin0629 nice work done! Keep up your good job!

}

if (args.length == 1) {
}else if (args.length == 1) {

Choose a reason for hiding this comment

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

Coding standard violation here: check if-else :D

@@ -135,7 +135,8 @@

private static final String DIVIDER = "===================================================";


private static final int COMMAND_TYPE_INDEX = 0;
private static final int COMMAND_ARG_INDEX = 1;

Choose a reason for hiding this comment

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

good job in eliminating magic numbers

private static boolean deletePersonFromAddressBook(String[] exactPerson) {
final boolean changed = ALL_PERSONS.remove(exactPerson);
if (changed) {
private static boolean hasDeletedPersonFromAddressBook(String[] exactPerson) {

Choose a reason for hiding this comment

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

good job in following the boolean naming convention

return splitArgs.length == PERSON_DATA_COUNT // 3 arguments
&& !splitArgs[PERSON_DATA_INDEX_NAME].isEmpty() // non-empty arguments
&& !splitArgs[PERSON_DATA_INDEX_PHONE].isEmpty()
&& !splitArgs[PERSON_DATA_INDEX_EMAIL].isEmpty();

Choose a reason for hiding this comment

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

good job here ^^

private static String removePrefixSign(String s, String sign) {
return s.replace(sign, "");
private static String removePrefixSign(String fullString, String prefix) {
return fullString.replace(prefix, "");

Choose a reason for hiding this comment

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

good job in trying to rename to make it sounds better ^^

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.

3 participants