@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 ":DeleteTaskCommandParser" as DeleteTaskCommandParser LOGIC_COLOR
participant "d:DeleteTaskCommand" as DeleteTaskCommand 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

-> LogicManager : execute("deletetask 1")
activate LogicManager

LogicManager -> AddressBookParser : parseCommand("deletetask 1")
activate AddressBookParser

create DeleteTaskCommandParser
AddressBookParser -> DeleteTaskCommandParser
activate DeleteTaskCommandParser

DeleteTaskCommandParser --> AddressBookParser
deactivate DeleteTaskCommandParser

AddressBookParser -> DeleteTaskCommandParser : parse("1")
activate DeleteTaskCommandParser

create DeleteTaskCommand
DeleteTaskCommandParser -> DeleteTaskCommand
activate DeleteTaskCommand

DeleteTaskCommand --> DeleteTaskCommandParser :
deactivate DeleteTaskCommand

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

AddressBookParser --> LogicManager : d
deactivate AddressBookParser

LogicManager -> DeleteTaskCommand : execute(m)
activate DeleteTaskCommand

DeleteTaskCommand -> Model : deletePerson(1)
activate Model

Model --> DeleteTaskCommand
deactivate Model

create CommandResult
DeleteTaskCommand -> CommandResult
activate CommandResult

CommandResult --> DeleteTaskCommand
deactivate CommandResult

DeleteTaskCommand --> LogicManager : r
deactivate DeleteTaskCommand

[<--LogicManager
deactivate LogicManager
@enduml
