@startuml
Communicator <-- AbstractCommunicator
AbstractCommunicator <-- ClientCommunicator
AbstractCommunicator <-- ServerCommunicator
Communicator o- CommunicationListener
MopedState -o AbstractCommunicator
MopedState -o Communicator


interface Communicator {
  +void sendState(MopedState)
  +void sendState(int)
  +void addListener(CommunicationListener)
  +void disconnect()
}

interface CommunicationListener {
  +void notifyState(MopedState)
}

abstract class AbstractCommunicator{
  +void methods()
  +int decode(MopedState)
  +MopedState encode()
}

class ClientCommunicator{
  +void connect()
}

class ServerCommunicator{
}

Enum MopedState {
  MANUAL = 0
  ACC= 1
}
@enduml