void notifyObservers() { for (int observerNum = 0; observerNum < observers.size(); observerNum++) observers.elementAt(observerNum).update(this); }
public void addObserver(CounterObserver observer) { observers.addElement(observer); observer.update(this); }