public void RequestCash(int cashToWithdraw) { Console.WriteLine("Request cash"); if (!HasCash()) { currentState = new NoCard(); } else { cash = cashToWithdraw; } currentState.RequestCash(this); }
public void ChangeState(ATMStateMachine aTMState) { currentState = aTMState; }
public ATMMachine() { currentState = new NoCard(); }