AY2324S1-CS2103T-T08-1 / tp

MIT License
0 stars 5 forks source link

Fix model constructors #129

Closed derekjxtan closed 1 year ago

derekjxtan commented 1 year ago

Overloaded constructors for Person, Patient, Doctor and Appointment to allow initialization with and without remarks and tags.

Note to those that will be doing tags, general way to work with tags will be:

  1. On add, use the current constructor without remark and tags.
  2. On add/remove remarks
    1. call getTags() to get the set of tags
    2. call tags.remove() or tags.add() to add/remove tags.
    3. create a new Instance with the modified tag set through the new constructor.

Data class is already created to be immutable so dont need to worry about causing problems to the existing models.

closes #132

codecov[bot] commented 1 year ago

Codecov Report

Merging #129 (074c682) into master (6796bcc) will increase coverage by 0.15%. The diff coverage is 100.00%.

@@             Coverage Diff              @@
##             master     #129      +/-   ##
============================================
+ Coverage     81.99%   82.14%   +0.15%     
- Complexity      712      716       +4     
============================================
  Files           105      105              
  Lines          2088     2106      +18     
  Branches        214      214              
============================================
+ Hits           1712     1730      +18     
  Misses          344      344              
  Partials         32       32              
Files Coverage Δ
...a/seedu/address/model/appointment/Appointment.java 100.00% <100.00%> (ø)
...c/main/java/seedu/address/model/person/Person.java 100.00% <100.00%> (ø)
...java/seedu/address/model/person/doctor/Doctor.java 90.00% <100.00%> (+1.11%) :arrow_up:
...va/seedu/address/model/person/patient/Patient.java 100.00% <100.00%> (ø)

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more