public ATMMachine() { hasCard = new HasCard(this); noCard = new NoCard(this); hasCorrectPin = new HasPin(this); atmOutOfMoney = new NoCash(this); atmState = noCard; if (cashInMachine < 0) { atmState = atmOutOfMoney; } }
public ATMMachine(ATMState _state) { CurrentState = _state; }
public void SetATMState(ATMState state) { atmState = state; }
public void setATMState(ATMState newAtmState) { atmState = newAtmState; }