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

Add Applicant type #46

Merged

Conversation

macareonie
Copy link
Member

No description provided.

macareonie and others added 6 commits March 10, 2024 00:22
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.
Copy link

codecov bot commented Mar 10, 2024

Codecov Report

Attention: Patch coverage is 96.15385% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 74.81%. Comparing base (52b9a37) to head (e23c6ba).

Files Patch % Lines
...ain/java/seedu/address/model/person/Applicant.java 66.66% 1 Missing ⚠️
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.
📢 Have feedback on the report? Share it here.

@yashpola yashpola changed the title Add applicant type Add Applicant type Mar 16, 2024
Copy link
Member

@headcube1 headcube1 left a 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";
Copy link
Member

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";

Copy link
Member

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 {

Copy link
Member

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.

Copy link

@gingerbreaf gingerbreaf left a 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.

@gingerbreaf gingerbreaf merged commit 84afcfb into AY2324S2-CS2103T-F11-3:master Mar 16, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants