added lab7 ex1

This commit is contained in:
2024-11-01 16:51:39 +01:00
parent 8cefde97d3
commit 8f38c89d7c
8 changed files with 248 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
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();
}
}