-
Notifications
You must be signed in to change notification settings - Fork 111
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
base: master
Are you sure you want to change the base?
Conversation
Hi @LiuYulin0629, your pull request title is invalid. It should be in the format of Submit only one activity per pull request (unless otherwise stated in instructions) and do remember to create your branches from the commit where the 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. |
There was a problem hiding this 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) { |
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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) { |
There was a problem hiding this comment.
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(); |
There was a problem hiding this comment.
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, ""); |
There was a problem hiding this comment.
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 ^^
Ready for review