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.