From 6d17229d1aef00d7c52d32d357dbae420ae6b1cb Mon Sep 17 00:00:00 2001 From: tengcharmaine Date: Sun, 14 Apr 2024 21:03:58 +0800 Subject: [PATCH 1/3] Update addcommand activity diagram --- docs/DeveloperGuide.md | 4 ++-- docs/diagrams/AddCommandActivityDiagram.puml | 22 ++++++++++++-------- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/docs/DeveloperGuide.md b/docs/DeveloperGuide.md index f627a4e4abb..6330d60ac92 100644 --- a/docs/DeveloperGuide.md +++ b/docs/DeveloperGuide.md @@ -161,7 +161,7 @@ Given below is an example usage scenario and how the add mechanism behaves at ea Step 1. The user launches the application for the first time. The `AddressBook` will be initialized with the initial address book state. -Step 2. The user executes `add n/John Doe …` to add the person in the address book with the unique identification number `T0123456A`. The add command calls `Model#addPerson(Person p)`, causing the modified state of the address book after the `add n/John Doe …` command executes to be saved. +Step 2. The user executes `add n\John Doe …` to add the person in the address book with the unique identification number `T0123456A`. The add command calls `Model#addPerson(Person p)`, causing the modified state of the address book after the `add n\John Doe …` command executes to be saved. @@ -171,7 +171,7 @@ Step 2. The user executes `add n/John Doe …` to add the person in the address -The following sequence diagram shows how an undo operation goes through the `Logic` component: +The following sequence diagram shows how an add operation goes through the `Logic` component: diff --git a/docs/diagrams/AddCommandActivityDiagram.puml b/docs/diagrams/AddCommandActivityDiagram.puml index 29992242ac8..d214e1d1141 100644 --- a/docs/diagrams/AddCommandActivityDiagram.puml +++ b/docs/diagrams/AddCommandActivityDiagram.puml @@ -8,15 +8,19 @@ start 'Since the beta syntax does not support placing the condition outside the 'diamond we place it as the true branch instead. -if () then ([command successful]) - :Save new contact to - addressbook; -else ([command unsuccessful]) - :Error messages; - :Edit command - accordingly; - :Successfully saves - new contact; +if () then ([user input is valid]) + if () then ([patient already exists]) + :System displays patient + already exists error message; + else ([else]) + :System inserts patient to + list of patients; + :System displays added patient + in patient list panel; + endif +else ([else]) + :System displays specific + error message; endif stop @enduml From 248db122d350a0f98d210fbffa375d878c396dbb Mon Sep 17 00:00:00 2001 From: tengcharmaine Date: Sun, 14 Apr 2024 21:21:54 +0800 Subject: [PATCH 2/3] Update size of activity diagram --- docs/DeveloperGuide.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/DeveloperGuide.md b/docs/DeveloperGuide.md index 6330d60ac92..b7da4c79804 100644 --- a/docs/DeveloperGuide.md +++ b/docs/DeveloperGuide.md @@ -184,7 +184,7 @@ The following sequence diagram shows how an add operation goes through the `Logi The following activity diagram summarizes what happens when a user executes a new command:
- +
#### Design Considerations & Alternatives Considered: @@ -363,7 +363,7 @@ The following activity diagram summarizes what happens when a user executes a ne **Aspect: Display of error message when command is unsuccessful:** * Current choice: Displays the correct error message based on the type of error made (e.g. missing fields, invalid ic format). - * Rationale: Users will be able to learn of their error quickly and have an idea of what to edit to make the command successful. + * Rationale: Users will be able to learn of their error quickly annd have an idea of what to edit to make the command successful. ### Edit feature From 3a33b712d7030b44c0b86dccf8372747b7c9bdf9 Mon Sep 17 00:00:00 2001 From: tengcharmaine Date: Sun, 14 Apr 2024 21:51:37 +0800 Subject: [PATCH 3/3] Update activity diagram for addnote --- .../AddNoteCommandActivityDiagram.puml | 24 ++++++++++++------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/docs/diagrams/AddNoteCommandActivityDiagram.puml b/docs/diagrams/AddNoteCommandActivityDiagram.puml index 62e9c6d0f0c..7e3dd1ea2b5 100644 --- a/docs/diagrams/AddNoteCommandActivityDiagram.puml +++ b/docs/diagrams/AddNoteCommandActivityDiagram.puml @@ -8,15 +8,21 @@ start 'Since the beta syntax does not support placing the condition outside the 'diamond we place it as the true branch instead. -if () then ([command successful]) - :Add new note to - specified patient; -else ([command unsuccessful]) - :Error messages; - :Edit command - accordingly; - :Successfully adds - new note; +if () then ([valid user input]) + if () then ([with -replace flag]) + :Successfully replaces original + note with new note; + :System displays the new note + on patient list panel; + else ([without -replace flag]) + :Successfully appends + new note to original note; + :System displays the updated + note on patient list panel; + endif +else ([else]) + :System displays specific + error messages; endif stop @enduml