Esempio n. 1
0
        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;
 }
Esempio n. 3
0
 public void SetATMState(ATMState state)
 {
     atmState = state;
 }
 public void SetATMState(ATMState state)
 {
     atmState = state;
 }
 public ATMMachine(ATMState _state)
 {
      CurrentState = _state;
 }
 public void setATMState(ATMState newAtmState)
 {
     atmState = newAtmState;
 }