Counter’s Observer-Related Methods
public void registerAsObserver(CounterObserver observer) {
this.observer = observer;
notifyObserver(); // Allow initial display
}
private void notifyObserver() {
observer.counterHasChanged(this);
}
Previous slide
Next slide
Back to first slide
View graphic version