@startuml
 !include style.puml

 box Logic LOGIC_COLOR_T1
 participant ":LogicManager" as LogicManager LOGIC_COLOR
 participant ":EduTrackParser" as EduTrackParser LOGIC_COLOR
 participant ":EditStudentCommandParser" as EditStudentCommandParser LOGIC_COLOR
 participant "EditStudentDescriptor" as EditStudentDescriptor LOGIC_COLOR
 participant ":EditStudentCommand" as EditStudentCommand LOGIC_COLOR
 participant ":CommandResult" as CommandResult LOGIC_COLOR
 end box

 box Model MODEL_COLOR_T1
 participant ":Model" as Model MODEL_COLOR
 end box

 [-> LogicManager : execute("edit /s 1 /c CS2103T n/John")
 activate LogicManager

 LogicManager -> EduTrackParser : parseCommand("edit /s 1 /c CS2103T n/John")
 activate EduTrackParser

 create EditStudentCommandParser



 EduTrackParser -> EditStudentCommandParser: EditStudentCommandParser()
 activate EditStudentCommandParser

 EditStudentCommandParser --> EduTrackParser

 deactivate EditStudentCommandParser

 EduTrackParser -> EditStudentCommandParser : parse("/s 1 /c CS2103T /nJohn")
 activate EditStudentCommandParser

 create EditStudentDescriptor
 EditStudentCommandParser -> EditStudentDescriptor : EditStudentDescriptor()
 activate EditStudentDescriptor

 EditStudentDescriptor --> EditStudentCommandParser
 deactivate EditStudentDescriptor

 EditStudentCommandParser -> EditStudentDescriptor : setName()
 activate EditStudentDescriptor

 EditStudentDescriptor --> EditStudentCommandParser
 deactivate

 create EditStudentCommand
 EditStudentCommandParser -> EditStudentCommand : EditStudentCommand()
 activate EditStudentCommand

 EditStudentCommand --> EditStudentCommandParser
 deactivate

 EditStudentCommandParser --> EduTrackParser
 deactivate

 'Hidden arrow to position the destroy marker below the end of the activation bar.
 EditStudentCommandParser -[hidden]-> EduTrackParser:
 destroy EditStudentCommandParser

 EduTrackParser --> LogicManager
 deactivate EduTrackParser

 LogicManager -> EditStudentCommand : execute()
 activate EditStudentCommand

 EditStudentCommand -> EditStudentCommand : createEditedStudent()
 activate EditStudentCommand

 EditStudentCommand --> EditStudentCommand : editedStudent
 deactivate

 EditStudentCommand -> Model : getClass(studentClassName)
 activate Model

 Model --> EditStudentCommand : studentClass
 deactivate

 EditStudentCommand -> Model : setStudent(editedStudent)
 activate Model

 Model --> EditStudentCommand
 deactivate

 EditStudentCommand -> Model : setStudentInClass(editedStudent, studentClass)
 activate Model

 Model --> EditStudentCommand
 deactivate

 EditStudentCommand -> Model : updateFilteredStudentList()
 activate Model

 Model --> EditStudentCommand
 deactivate

 create CommandResult
 EditStudentCommand -> CommandResult
 activate CommandResult

 CommandResult --> EditStudentCommand
 deactivate CommandResult

 EditStudentCommand --> LogicManager : result
 deactivate EditStudentCommand

 [<--LogicManager
 deactivate LogicManager
 @enduml
