Skip to content

Commit

Permalink
Merge pull request #33 from ryanlimdx/uml
Browse files Browse the repository at this point in the history
Add Uml file (sequence diagram) for AddCommand
  • Loading branch information
iamtr authored Mar 20, 2024
2 parents 938fb4c + d5b1bd6 commit 1376875
Showing 1 changed file with 70 additions and 0 deletions.
70 changes: 70 additions & 0 deletions docs/diagrams/AddSequenceDiagram.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
@startuml
!include style.puml
skinparam ArrowFontStyle plain

box Logic LOGIC_COLOR_T1
participant ":LogicManager" as LogicManager LOGIC_COLOR
participant ":AddressBookParser" as AddressBookParser LOGIC_COLOR
participant ":AddCommandParser" as AddCommandParser LOGIC_COLOR
participant "a:AddCommand" as AddCommand LOGIC_COLOR
participant "r:CommandResult" as CommandResult LOGIC_COLOR
end box

box Model MODEL_COLOR_T1
participant "m:Model" as Model MODEL_COLOR
end box
'add parameters of add command here'
[-> LogicManager : execute("add")
activate LogicManager
'add parameters of add command here'
LogicManager -> AddressBookParser : parseCommand("add ")
activate AddressBookParser

create AddCommandParser
AddressBookParser -> AddCommandParser
activate AddCommandParser

AddCommandParser --> AddressBookParser
deactivate AddCommandParser
'add parameters of add command here; replace '1''
AddressBookParser -> AddCommandParser : parse("1")
activate AddCommandParser

create AddCommand
AddCommandParser -> AddCommand
activate AddCommand

AddCommand --> AddCommandParser :
deactivate AddCommand

AddCommandParser --> AddressBookParser : a
deactivate AddCommandParser
'Hidden arrow to position the destroy marker below the end of the activation bar.
AddCommandParser -[hidden]-> AddressBookParser
destroy AddCommandParser

AddressBookParser --> LogicManager : a
deactivate AddressBookParser

LogicManager -> AddCommand : execute(m)
activate AddCommand
'add parameters of add command here; replace '1''
AddCommand -> Model : AddPerson(1)
activate Model

Model --> AddCommand
deactivate Model

create CommandResult
AddCommand -> CommandResult
activate CommandResult

CommandResult --> AddCommand
deactivate CommandResult

AddCommand --> LogicManager : r
deactivate AddCommand

[<--LogicManager
deactivate LogicManager
@enduml

0 comments on commit 1376875

Please sign in to comment.