// A Model class that extends the Observable class. // Barry Cornelius, 19th February 2000 import java.util. Observable; public class Model extends Observable { private int iValue; public Model() { iValue = 0; } public synchronized int get() { return iValue; } public synchronized void set(final int pValue) { iValue = pValue; setChanged(); notifyObservers(); } public synchronized void inc() { iValue++; setChanged(); notifyObservers(); } }