From 9c71d5348f1ae86c62b636890bd873b56bcfc5a1 Mon Sep 17 00:00:00 2001 From: Rachel Tai Ke Jia Date: Tue, 12 Nov 2024 12:20:08 +0800 Subject: [PATCH 1/4] Update format of enhancements --- README.md | 2 +- docs/DeveloperGuide.md | 31 ++++++++++++++++--------------- 2 files changed, 17 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index 9ddf01bcca2..6799ff26f5f 100644 --- a/README.md +++ b/README.md @@ -13,5 +13,5 @@ ## More about it * It is **written in OOP fashion**. It provides a **reasonably well-written** code base **bigger** (around 6 KLoC) than what students usually write in beginner-level SE modules, without being overwhelmingly big. - * For user and developer documentation**, head over to **[DocTrack Documentation](https://ay2425s1-cs2103t-w10-2.github.io/tp/)**. + * For user and developer documentation, head over to **[DocTrack Documentation](https://ay2425s1-cs2103t-w10-2.github.io/tp/)**. * This project is based on the AddressBook-Level3 project created by the [SE-EDU initiative](https://se-education.org) diff --git a/docs/DeveloperGuide.md b/docs/DeveloperGuide.md index 3ab7f21a3ab..05343eb248f 100644 --- a/docs/DeveloperGuide.md +++ b/docs/DeveloperGuide.md @@ -1099,7 +1099,7 @@ Team size: 5 * **Sample Input:** User enters: `sort` * **Expected Output:** The result display box shows `Unknown Command. Did you mean: list, find, clear, add, edit, delete, exit, or help?` -2. **Modify date parsing to check for leap years** +2. **Modify date parsing to check for leap years.** * **Flaw:** When a user enters February 29 for a non-leap year, the date automatically adjusts to February 28, which may be confusing. * **Enhancement:** Modify the date parsing logic to check for leap years. @@ -1108,44 +1108,45 @@ Team size: 5 * **Sample Input:** User enters `2023-02-29` for an appointment date. * **Expected Output:** The result display box shows `Invalid date: 2023 is not a leap year, so February 29 is not valid.` -3. **Modify date parsing to check for valid dates** +3. **Modify date parsing to check for valid dates.** * **Flaw:** Entering an invalid date such as January 32 returns an error message that says "Invalid date-time format," which is unclear since the format itself is correct. * **Enhancement:** Modify the date parsing logic to check for valid dates, such as ensuring that the day is within the range of the month. * **Sample Input:** User enters `2023-03-32` for an appointment date. * **Expected Output:** The result display box shows `Invalid date: The day is out of range for the month`. -4. **Modify index parsing to check for valid indexes** +4. **Modify index parsing to check for valid indexes.** * **Flaw:** For `edit` commands utilising `INDEX` as a field, when users input an index larger than the list size of `Person` or `Appointment`, the application does not check for the validity of the index. * **Enhancement:** Implement a check to ensure that the index provided by the user is within the valid range of the list size. If the index is invalid, display an error message to the user. -* **Sample Input:** `edit person 100000` +* **Sample Input:** User enters `edit person 100000` * **Expected Output:** The result display box shows `Invalid index! Please enter a valid index within the list size.` -5. **Modify date parsing to check for valid times** +5. **Modify date parsing to check for valid times.** * **Flaw:** Entering an invalid times such as `2024-05-12 25:61` returns an error message that says "Invalid date-time format," which is unclear since the format is correct. * **Enhancement:** Modify the date parsing logic to check for valid times, such as ensuring that the time is between 00:00 and 23:59. * **Sample Input:** User enters `... d/2024-05-12 25:61` * **Expected Output:** The result display box shows `Invalid time format. Please enter a valid time between 00:00 and 23:59.` -6. **Update patient name in appointment when patient's name is edited** +6. **Update patient name in appointment when patient's name is edited.** * **Flaw:** When users edit a `person` with a new name, his/her appointments still refer to the old name. -* **Enhancement:** During the EditPersonCommand, also edit any appointments with this patient to point to the new Person object. +* **Enhancement:** During the `EditPersonCommand`, also edit any appointments with this patient to point to the new `Person` object. * **Sample Input:** Suppose there is a person indexed 1 named John. Execute `edit person 1 n/Jonathan`. * **Expected Output:** Any appointments with John should now refer to Jonathan. -7. **You can only add appointments without sickness or medicine, but not edit them** -* **Flaw:** When users edit an `appointment` such that sickness or medicine is null, the GUI invalidates this input even though these fields are optional. +7. **You can only add appointments without sickness or medicine, but not edit them.** +* **Flaw:** When users edit an `appointment`, such that the sickness or medicine field is null, the GUI invalidates this input even though these fields are optional. * **Enhancement:** Change input validation for sickness and medicine to allow for null values. -* **Sample Input:** `edit appt 1 s/ m/` +* **Sample Input:** User enters `edit appt 1 s/ m/` * **Expected Output:** Appointment indexed 1 should have sickness and medicine shown as null. -8. **Error messages should specify time format** -* **Flaw:** When inputing an invalid time such as 25:00, it would be helpful if the error message shows that invalid format for time has been provided incase some people are unfamiliar with 24-hour time. -* **Enhancement:** Change the error message for cases where time format is incorrect. -* **Sample Input:** `edit appt 3 d/2024-12-05 25:00` -* **Expected Output:** Invalid date-time format. Expected format: yyyy-MM-dd HH:mm for example 2024-04-24 13:00 is 24th March 2024, 1:00 PM. +8. **Error messages should specify time format.** +* **Flaw:** When users input an invalid time such as `25:00`, it would be helpful if the error message shows that invalid format for time has been provided. This would provide more information for those who + may be unfamiliar with 24-hour time format. +* **Enhancement:** Change the error message for cases where the time format is incorrect. +* **Sample Input:** User enters `edit appt 3 d/2024-12-05 25:00` +* **Expected Output:** The result display box shows `Invalid date-time format. Expected format: yyyy-MM-dd HH:mm. For example, 2024-04-24 13:00, which would be 24th March 2024, 1:00 PM.
-------------------------------------------------------------------------------------------------------------------- From 4d1d6d0b4a470ec238460a0dc3b05ddebafd1a6a Mon Sep 17 00:00:00 2001 From: Rachel Tai Ke Jia Date: Tue, 12 Nov 2024 12:28:56 +0800 Subject: [PATCH 2/4] Add lifeline for parser --- docs/DeveloperGuide.md | 6 ++++++ docs/diagrams/EntityCommandSequenceDiagram.puml | 3 +++ 2 files changed, 9 insertions(+) diff --git a/docs/DeveloperGuide.md b/docs/DeveloperGuide.md index 05343eb248f..2277737336b 100644 --- a/docs/DeveloperGuide.md +++ b/docs/DeveloperGuide.md @@ -244,6 +244,12 @@ The sequence diagram shows how an entity command is executed: +**Note:** The lifeline for `xyzCommandParser` should end at the destroy marker (X) but due to a limitation +of PlantUML, the lifeline continues till the end of diagram. + + + + **Note:** There are two entities, `Person` and `Appointment`. - The entity referred in `FindEntityCommand` refers to `FindPersonCommand` and `FindAppointmentCommand`. - Similarly, the entity referred in `AddEntityCommand` refers to `AddPersonCommand` and `AddAppointmentCommand`. diff --git a/docs/diagrams/EntityCommandSequenceDiagram.puml b/docs/diagrams/EntityCommandSequenceDiagram.puml index 18b8fa2a027..e22d3c77cb0 100644 --- a/docs/diagrams/EntityCommandSequenceDiagram.puml +++ b/docs/diagrams/EntityCommandSequenceDiagram.puml @@ -37,6 +37,9 @@ note right of XYZCommand: XYZCommand = \nFindEntityCommand, \nAddEntityCommand, XYZCommand --> CommandParser CommandParser --> AddressBookParser deactivate CommandParser +'Hidden arrow to position the destroy marker below the end of the activation bar. +CommandParser -[hidden]-> AddressBookParser +destroy CommandParser deactivate XYZCommand AddressBookParser --> LogicManager : e From 98f15be80513ef88d3db4bb3f7e15a2b2ca8d3f0 Mon Sep 17 00:00:00 2001 From: Rachel Tai Ke Jia Date: Tue, 12 Nov 2024 12:29:58 +0800 Subject: [PATCH 3/4] Update activation bar --- docs/diagrams/EntityCommandSequenceDiagram.puml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/diagrams/EntityCommandSequenceDiagram.puml b/docs/diagrams/EntityCommandSequenceDiagram.puml index e22d3c77cb0..197d7926cad 100644 --- a/docs/diagrams/EntityCommandSequenceDiagram.puml +++ b/docs/diagrams/EntityCommandSequenceDiagram.puml @@ -35,12 +35,13 @@ activate XYZCommand note right of XYZCommand: XYZCommand = \nFindEntityCommand, \nAddEntityCommand, \nDeleteEntityCommand, \nEditEntityCommand, \nClearEntityCommand, \nListEntityCommand XYZCommand --> CommandParser +deactivate XYZCommand + CommandParser --> AddressBookParser deactivate CommandParser 'Hidden arrow to position the destroy marker below the end of the activation bar. CommandParser -[hidden]-> AddressBookParser destroy CommandParser -deactivate XYZCommand AddressBookParser --> LogicManager : e deactivate AddressBookParser From 1bab15fe6d6c4ea01bd58064b1cf0df9838de7cd Mon Sep 17 00:00:00 2001 From: Rachel Tai Ke Jia Date: Tue, 12 Nov 2024 13:02:30 +0800 Subject: [PATCH 4/4] Add enhancement for sequence diagram --- docs/DeveloperGuide.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/DeveloperGuide.md b/docs/DeveloperGuide.md index 2277737336b..ccf943a2fb9 100644 --- a/docs/DeveloperGuide.md +++ b/docs/DeveloperGuide.md @@ -1153,6 +1153,11 @@ Team size: 5 * **Enhancement:** Change the error message for cases where the time format is incorrect. * **Sample Input:** User enters `edit appt 3 d/2024-12-05 25:00` * **Expected Output:** The result display box shows `Invalid date-time format. Expected format: yyyy-MM-dd HH:mm. For example, 2024-04-24 13:00, which would be 24th March 2024, 1:00 PM. + +9. **The sequence diagram for the entity commands should include interactions with the `Model` class** +* **Flaw:** The current sequence diagram (EntityCommandSequenceDiagram.puml) for the entity commands does + not include interactions with the `Model` class. +* **Enhancement:** Update the sequence diagram to include interactions with the `Model` class. Reference frames can be included to show the interactions with the `Model` class for different commands.
--------------------------------------------------------------------------------------------------------------------