-
Notifications
You must be signed in to change notification settings - Fork 5
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
Add Applicant type #46
Add Applicant type #46
Conversation
To fit the requirements of out tP idea, just having a Person class is insufficient. There needs to be a more specific class for differentiation with other Person types to be implemented in the future. Let's, * Add an Applicant class. * Add the corresponding Command and CommandParser classes. * Update related test cases.
…into add-applicant-type
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #46 +/- ##
============================================
+ Coverage 74.77% 74.81% +0.03%
- Complexity 429 432 +3
============================================
Files 73 75 +2
Lines 1348 1354 +6
Branches 129 129
============================================
+ Hits 1008 1013 +5
- Misses 309 310 +1
Partials 31 31 ☔ View full report in Codecov by Sentry. |
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.
LGTM!
*/ | ||
public class AddApplicantCommand extends AddCommand { | ||
|
||
public static final String COMMAND_WORD = AddCommand.COMMAND_WORD + "_applicant"; |
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.
Looks good! Nice way of creating a new class that inherits from the AddCommand.
*/ | ||
public class AddCommand extends Command { | ||
public abstract class AddCommand extends Command { | ||
|
||
public static final String COMMAND_WORD = "add"; | ||
|
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.
Changing to abstract class. Will take note!
* Guarantees: details are present and not null, field values are validated, immutable. | ||
*/ | ||
public class Applicant extends Person { | ||
|
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.
Nice use of inheritance to create a subclass of Persons.
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.
LGTM, good OOP design.
No description provided.