22 lines
486 B
Java
22 lines
486 B
Java
package lab7_state.ex1;
|
|
|
|
public abstract class MachineState {
|
|
protected Machine machine;
|
|
|
|
public MachineState(Machine machine) {
|
|
this.machine = machine;
|
|
}
|
|
|
|
protected void powerUp() {}
|
|
protected void insertCoin(double value) {}
|
|
protected void returnCoin() {}
|
|
protected void reset() {}
|
|
protected void pushButton() {}
|
|
protected void removeCup() {}
|
|
|
|
@Override
|
|
public String toString() {
|
|
return getClass().getSimpleName();
|
|
}
|
|
}
|