@startuml
!include style.puml

Actor User as user USER_COLOR
Participant ":UI" as ui UI_COLOR
Participant ":Logic" as logic LOGIC_COLOR
Participant ":Model" as model MODEL_COLOR
Participant ":Storage" as storage STORAGE_COLOR

user -[USER_COLOR]> ui : "delete 1"
activate ui UI_COLOR

ui -[UI_COLOR]> logic : execute("delete 1")
activate logic LOGIC_COLOR

logic -[LOGIC_COLOR]> model : deletePerson(p)
activate model MODEL_COLOR

model -[MODEL_COLOR]-> logic
deactivate model

logic -[LOGIC_COLOR]> storage : saveAddressBook(addressBook)
activate storage STORAGE_COLOR

storage -[STORAGE_COLOR]> storage : Save to file
activate storage STORAGE_COLOR_T1
storage --[STORAGE_COLOR]> storage
deactivate storage

storage --[STORAGE_COLOR]> logic
deactivate storage

logic --[LOGIC_COLOR]> ui
deactivate logic

ui--[UI_COLOR]> user
deactivate ui
@enduml
