Ornamental Garden - Turnstile Class

Ornamental Garden - Turnstile Class

class Turnstile extends Thread {

Counter people_;

Turnstile(Counter c,) {

people_ = c;

}

public void run() {

while(true)

people_.increment();

}

}

This an abbreviated version of the Turnstile class. For the full version including display code see the online example.

Previous slide Next slide Back to the first slide View Graphic Version