|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectedu.colorado.simulations.Washer
public class Washer
An Washer simulates a simple washing machine.
| Constructor Summary | |
|---|---|
Washer(int s)
Initialize a washer. |
|
| Method Summary | |
|---|---|
boolean |
isBusy()
Determine whether this washer is currently busy. |
void |
reduceRemainingTime()
Reduce the remaining time in the current wash cycle by one second. |
void |
startWashing()
Start a wash cycle going for this washer. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Washer(int s)
s
the number of seconds required for one wash cyle of this washer
s
| Method Detail |
|---|
public boolean isBusy()
- - none
true if this washer is busy (in a wash cycle);
otherwise falsepublic void reduceRemainingTime()
- - none
public void startWashing()
- - none
isBusy() is false.
isBusy() will return true until the required
number of simulated seonds have passed.
java.lang.IllegalStateException - Indicates that this washer is busy.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||