@startuml
'https://plantuml.com/class-diagram

!include Style.puml

package command {
    class "{abstract}\n Command "
    class DeleteCommand
    class TextUi
    class ExitCommand

    "{abstract}\n Command " <|-- DeleteCommand
    "{abstract}\n Command " <|-- ExitCommand
    DeleteCommand ..> CommandResult :creates >
    ExitCommand ..> CommandResult :creates >

    DeleteCommand ..> TextUi :uses >

    class "{abstract}\n Command " {
        +execute(): CommandResult { abstract }
    }

    class DeleteCommand {
    -moduleCode: String
    -taskModule: String
    -taskIndex: int
    +DeleteCommand(moduleCode: String)
    +DeleteCommand(taskModule: String, index: int)
    +execute(): CommandResult
    +getUserConfirmation(): String {static}
    }

    class TextUi {
    +getUserCommand(): String {static}
    +showMessage(): void {static}
    }

    class ExitCommand {
    +execute(): CommandResult
    }

    class CommandResult {
    +CommandResult(result: String)
    +toString(): String
    }
}

note top of command
Note:
This class diagram only illustrates two
example command types for simplicity.
end note

note left of DeleteCommand
Note:
Dependency on TextUi is
unique to DeleteCommand.
end note

@enduml