Home / cs-notes / Design / Design Patterns / Behavioral Patterns / Observer
@startuml
interface Observable {
+ addObserver(observer: Observer)
+ removeObserver(observer: Observer)
+ notifyObservers()
}
interface Observer {
+ update(observable: Observable)
}
Observable o-> Observer
@enduml