Example #1
0
        public void RequestCash(int cashToWithdraw)
        {
            Console.WriteLine("Request cash");
            if (!HasCash())
            {
                currentState = new NoCard();
            }
            else
            {
                cash = cashToWithdraw;
            }

            currentState.RequestCash(this);
        }
Example #2
0
 public void ChangeState(ATMStateMachine aTMState)
 {
     currentState = aTMState;
 }
Example #3
0
 public ATMMachine()
 {
     currentState = new NoCard();
 }