diff --git a/docs/DeveloperGuide.md b/docs/DeveloperGuide.md index d10715cb90e..a916931902a 100644 --- a/docs/DeveloperGuide.md +++ b/docs/DeveloperGuide.md @@ -237,6 +237,8 @@ The following sequence diagram summarizes what happens when a user executes a ne ![EditSequenceDiagram.png](images/EditSequenceDiagram.png) +The following activity diagram summarizes what happens when a user executes a new command: +![EditCommandActivityDiagram.png](images/EditCommandActivityDiagram.png) ### Showing help for commands diff --git a/docs/diagrams/EditCommandActivityDiagram.puml b/docs/diagrams/EditCommandActivityDiagram.puml new file mode 100644 index 00000000000..278528c3862 --- /dev/null +++ b/docs/diagrams/EditCommandActivityDiagram.puml @@ -0,0 +1,27 @@ +@startuml +skin rose +skinparam ActivityFontSize 15 +skinparam ArrowFontSize 12 + +start +:User executes command; +:AddressBookParser parses the command; +:EditCommandParser parses the command; +if () then ([index is valid]) + if () then ([no duplicate prefixes present]) + :get value for each prefix that is present; + :store value in EditPersonDescriptor; + :return new EditCommand; + :replace selected contact with edited contact; + :show all contacts; + else ([duplicate prefixes present]) + :show error message; + endif +else ([index is not valid]) + :show error message; +endif + + +stop + +@enduml diff --git a/docs/images/EditCommandActivityDiagram.png b/docs/images/EditCommandActivityDiagram.png new file mode 100644 index 00000000000..e0c8e45bc48 Binary files /dev/null and b/docs/images/EditCommandActivityDiagram.png differ