class GuterWert extends Wert {
  private boolean verfuegbar = false;
  public synchronized int get() {
    if (!verfuegbar)
      try {
        wait();
      }
      catch (InterruptedException ie) {
      }
    verfuegbar = false;
    notify();
    return wert;
  }
  public synchronized void put (int w) {
    if (verfuegbar)
      try {
        wait();
      }
      catch (InterruptedException ie) {
      }
    wert = w;
    verfuegbar = true;
    notify();
  }
}
