You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/DeveloperGuide.md
+76-3Lines changed: 76 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -606,6 +606,7 @@ Priorities: High (must have) - `* * *`, Medium (nice to have) - `* *`, Low (unli
606
606
Steps 1a1-1a3 are repeated until the data entered are correct.<br>
607
607
Use case resumes at step 2.
608
608
609
+
609
610
**Use case: UC05 - View client details and policies**
610
611
611
612
**MSS**
@@ -626,7 +627,6 @@ Priorities: High (must have) - `* * *`, Medium (nice to have) - `* *`, Low (unli
626
627
Use case ends.
627
628
628
629
629
-
630
630
**Use case: UC06 - Find a client by name**
631
631
632
632
**MSS**
@@ -647,6 +647,7 @@ Priorities: High (must have) - `* * *`, Medium (nice to have) - `* *`, Low (unli
647
647
* 1b1. ClientCare lets user know that the list is empty.<br>
648
648
Use case ends.
649
649
650
+
650
651
**Use case: UC07 - Adding notes to a client**
651
652
652
653
**MSS**
@@ -688,12 +689,25 @@ Priorities: High (must have) - `* * *`, Medium (nice to have) - `* *`, Low (unli
688
689
Steps 1a1-1a3 are repeated until the data entered are correct.<br>
689
690
Use case resumes at step 2.
690
691
692
+
691
693
**Use case: UC09 - Sort clients**
692
694
693
695
**MSS**
694
-
1. PLACEHOLDER
696
+
1. User requests to sort clients by `CRITERIA` and `ORDER`.
697
+
2. ClientCare sorts the clients by the specified criteria and order.
698
+
3. ClientCare shows a success message to the user.<br>
699
+
Use case ends.
695
700
696
701
**Extensions**
702
+
* 1a. ClientCare detects that the given command is invalid.
703
+
* 1a1. ClientCare shows an error message.
704
+
Use case ends.
705
+
* 1b. ClientCare detects that the given `CRITERIA` is invalid.
706
+
* 1b1. ClientCare shows an error message.
707
+
Use case ends.
708
+
* 1c. ClientCare detects that the given `ORDER` is invalid.
709
+
* 1c1. ClientCare shows an error message.
710
+
Use case ends.
697
711
698
712
699
713
**Use case: UC10 - Update client as met**
@@ -717,6 +731,7 @@ Priorities: High (must have) - `* * *`, Medium (nice to have) - `* *`, Low (unli
717
731
* 1c1. ClientCare shows an error message.<br>
718
732
Use case ends.
719
733
734
+
720
735
**Use case: UC11 - Update last met overdue duration**
721
736
722
737
**MSS**
@@ -735,7 +750,8 @@ Priorities: High (must have) - `* * *`, Medium (nice to have) - `* *`, Low (unli
735
750
* 1b. ClientCare detects that the given input entered is not a non-negative integer.
736
751
* 1b1. ClientCare shows an error message.<br>
737
752
Use case ends.
738
-
753
+
754
+
739
755
**Use case: UC12 - Schedule an appointment with client**
740
756
741
757
**MSS**
@@ -781,6 +797,7 @@ Priorities: High (must have) - `* * *`, Medium (nice to have) - `* *`, Low (unli
781
797
* 1c1. ClientCare shows an error message.<br>
782
798
Use case ends.
783
799
800
+
784
801
**Use case: UC14 - Add policies to client**
785
802
786
803
**MSS**
@@ -803,6 +820,7 @@ Priorities: High (must have) - `* * *`, Medium (nice to have) - `* *`, Low (unli
803
820
* 1c1. ClientCare shows an error message.<br>
804
821
Use case ends.
805
822
823
+
806
824
**Use case: UC15 - Delete policies from client**
807
825
808
826
**MSS**
@@ -825,6 +843,7 @@ Priorities: High (must have) - `* * *`, Medium (nice to have) - `* *`, Low (unli
825
843
* 1c1. ClientCare shows an error message.<br>
826
844
Use case ends.
827
845
846
+
828
847
### Non-Functional Requirements
829
848
830
849
1. Should work on any _mainstream OS_ as long as it has Java `11` or above installed.
@@ -1041,6 +1060,54 @@ testers are expected to do more *exploratory* testing.
1041
1060
1042
1061
### Sorting clients
1043
1062
1063
+
1. Sorting clients by priority
1064
+
1065
+
1. Prerequisites: Multiple clients in the client list.
1066
+
1067
+
2. Test case (valid descending): `sort priority o/desc`<br>
1068
+
Expected: Clients are sorted by priority in descending order. Success message shown in the status message.
1069
+
1070
+
3. Test case (valid ascending): `sort priority o/asc`<br>
1071
+
Expected: Clients are sorted by priority in ascending order. Success message shown in the status message.
1072
+
1073
+
4. Test case (invalid order): `sort priority o/invalid`<br>
1074
+
Expected: Clients are not sorted. Error message shown in the status message.
1075
+
1076
+
5. Test case (invalid criteria): `sort invalid o/asc`<br>
1077
+
Expected: Similar to previous.
1078
+
1079
+
2. Sorting clients by name
1080
+
1081
+
1. Prerequisites: Multiple clients in the client list.
1082
+
1083
+
2. Test case (valid ascending): `sort name o/asc`<br>
1084
+
Expected: Clients are sorted by name in ascending order. Success message shown in the status message.
1085
+
1086
+
3. Test case (valid descending): `sort name o/desc`<br>
1087
+
Expected: Clients are sorted by name in descending order. Success message shown in the status message.
1088
+
1089
+
4. Test case (invalid order): `sort name o/invalid`<br>
1090
+
Expected: Clients are not sorted. Error message shown in the status message.
1091
+
1092
+
5. Test case (invalid criteria): `sort invalid o/asc`<br>
1093
+
Expected: Similar to previous.
1094
+
1095
+
3. Sorting clients by birthday
1096
+
1097
+
1. Prerequisites: Multiple clients in the client list.
1098
+
1099
+
2. Test case (valid ascending): `sort birthday o/asc`<br>
1100
+
Expected: Clients are sorted by birthday in ascending order. Success message shown in the status message.
1101
+
1102
+
3. Test case (valid descending): `sort birthday o/desc`<br>
1103
+
Expected: Clients are sorted by birthday in descending order. Success message shown in the status message.
1104
+
1105
+
4. Test case (invalid order): `sort birthday o/invalid`<br>
1106
+
Expected: Clients are not sorted. Error message shown in the status message.
1107
+
1108
+
5. Test case (invalid criteria): `sort invalid o/asc`<br>
1109
+
Expected: Similar to previous.
1110
+
1044
1111
### Updating last met
1045
1112
1046
1113
1. Updating the last met of a client while all clients are being shown
@@ -1292,6 +1359,12 @@ Additional testing was needed to ensure that the policies are saved correctly an
1292
1359
As to keep the `Person` object immutable, we had to create a new `Person` object with the updated policy list when adding or deleting a policy. This made testing for the `addpolicy` and `deletepolicy` commands more difficult as the `addressbook` object prevents us from directly updating the `Person` object. Thus, more methods have to be implemented in `ModelManger` class to enable proper updating of the expected `AddressBook` object when testing.
1293
1360
1294
1361
**3. Additional Client Traits and Features**<br>
1362
+
Difficulty Level: 3/5<br>
1363
+
Effort Required: 3/5<br>
1364
+
Challenges faced: When implementing sorting of clients, the challenge was understanding the design principles behind how `ModelManager#filteredPersons` was implemented in AB3. Since this is an iterative project, we had to ensure that the principles were consistent.
1365
+
For instance, we recognised that `ModelManager#filteredPersons` was an immutable list, and thus our initial implementation of removing the `final` keyword from the `filteredPersons` field was incorrect and broke the design principles. We had to revert this change and design an alternative solution that adhered to the design principles.
1366
+
This took some time to understand and implement correctly. `Birthday` and `Priority` are extensions of the `Person` model and required classes of their own. `DateUtil` and `DateTimeUtil` classes were additionally created to handle dates and times, which was used widely, and thus had to be well-designed to ensure utility and prevent bugs.
1367
+
Testing for most features were very extensive, with multiple edge cases and invalid inputs. Quality of design was ensured and priorities over shortcut alternatives. For instance, data structures like `HashMap` was utilised to map string inputs to `PriorityValue` enums. All these quality design required time and effort.
0 commit comments