-
Notifications
You must be signed in to change notification settings - Fork 4
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
Enable vip status to be initialized as input #98
Enable vip status to be initialized as input #98
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
|
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.
Only minor nits, LGTM
@@ -50,7 +52,9 @@ public AddCommand parse(String args) throws ParseException { | |||
Comment comment = ParserUtil.parseComment(argMultimap.getValue(PREFIX_COMMENT).orElse(EMPTY_COMMENT)); | |||
Set<Tag> tagList = ParserUtil.parseTags(argMultimap.getAllValues(PREFIX_TAG)); | |||
|
|||
Person person = new Person(name, phone, email, address, comment, tagList); | |||
// Parse VIP status; default to false if not provided | |||
boolean isVip = Boolean.parseBoolean(argMultimap.getValue(PREFIX_VIP).orElse(DEFAULT_VIP)); |
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.
Minor nit: might've made more sense to put this like with the previous paragraph
@@ -41,7 +42,7 @@ public PersonBuilder() { | |||
address = new Address(DEFAULT_ADDRESS); | |||
comment = new Comment(DEFAULT_COMMENT); | |||
tags = new HashSet<>(); | |||
isVip = false; | |||
isVip = DEFAULT_IS_VIP; |
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 practice!
3213c65
into
AY2425S1-CS2103T-T17-2:master
No description provided.