Client-Objekte (II)

class Customer implements Runnable {
  private String name;
  private Clerk clerk; 
  private int items;  ...
  public void run () {
    for (int k=0; k<items; k++) {
      Util.nap ();
      int x = clerk.get ();
      System.out.println 
        ("Customer " + name + " got item " + x);
    }
  }
}



Johannes Waldmann 2007-06-04