Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Uml file (sequence diagram) for AddCommand #33

Merged
merged 1 commit into from
Mar 20, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading