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

Create Seller and Buyer classes with add commands and test cases #60

Merged

Conversation

felixchanyy
Copy link
Collaborator

Currently, there are no specific classes for representing sellers and buyers in the address book application.

To differentiate between sellers and buyers in the address book application and to allow for specific functionalities and attributes for each.

Two new classes, Seller and Buyer, are created as subclasses of the Person class. Each class has its own add command and test cases to ensure proper functionality.

Subclassing from the Person class allows for code reuse and maintains consistency in the application's design.
Separate classes enable distinct behavior and attributes for sellers and buyers.

The new classes adhere to the existing design patterns and principles in the address book application. Tests cover various scenarios to ensure the correctness of the implementations.

Currently, there are no specific classes for representing
sellers and buyers in the address book application.

To differentiate between sellers and buyers in the address book
application and to allow for specific functionalities and
attributes for each.

Two new classes, Seller and Buyer, are created as subclasses of the
Person class. Each class has its own add command and test cases to
ensure proper functionality.

Subclassing from the Person class allows for code reuse and maintains
consistency in the application's design.
Separate classes enable distinct behavior and attributes
for sellers and buyers.

The new classes adhere to the existing design patterns and principles
in the address book application. Tests cover various scenarios
to ensure the correctness of the implementations.
@felixchanyy felixchanyy added the enhancement New feature or request label Mar 18, 2024
@felixchanyy felixchanyy added this to the v1.2 milestone Mar 18, 2024
@felixchanyy felixchanyy self-assigned this Mar 18, 2024
Copy link

codecov bot commented Mar 18, 2024

Codecov Report

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

Project coverage is 72.97%. Comparing base (9ef61aa) to head (32af1c7).
Report is 1 commits behind head on master.

Files Patch % Lines
.../seedu/address/logic/commands/AddBuyerCommand.java 0.00% 19 Missing ⚠️
...seedu/address/logic/commands/AddSellerCommand.java 0.00% 19 Missing ⚠️
...du/address/logic/parser/AddBuyerCommandParser.java 0.00% 16 Missing ⚠️
...u/address/logic/parser/AddSellerCommandParser.java 0.00% 16 Missing ⚠️
.../seedu/address/logic/parser/AddressBookParser.java 0.00% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master      #60      +/-   ##
============================================
- Coverage     76.57%   72.97%   -3.61%     
- Complexity      466      468       +2     
============================================
  Files            76       82       +6     
  Lines          1456     1532      +76     
  Branches        139      147       +8     
============================================
+ Hits           1115     1118       +3     
- Misses          311      383      +72     
- Partials         30       31       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

@KhoonSun47 KhoonSun47 left a comment

Choose a reason for hiding this comment

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

LGTM

@felixchanyy felixchanyy merged commit 40ab66c into AY2324S2-CS2103-F09-1:master Mar 18, 2024
3 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants