Exemplo n.º 1
0
 // this constructor will be used by the other one
 public CardValidatedState(int amountRemaining, ATM atmBeingUsed)
 {
     this.Atm = atmBeingUsed;
     this.DummyCashPresent = amountRemaining;
 }
Exemplo n.º 2
0
 // this constructor will be used by the other one
 public CashWithdrawnState(int amountRemaining, ATM atmBeingUsed)
 {
     this.Atm = atmBeingUsed;
     this.DummyCashPresent = amountRemaining;
 }
Exemplo n.º 3
0
 // this constructor will be used by the other one
 public CardValidatedState(int amountRemaining, ATM atmBeingUsed)
 {
     this.Atm = atmBeingUsed;
     this.DummyCashPresent = amountRemaining;
 }
Exemplo n.º 4
0
        private static void TestWithStatePattern()
        {
            ATM atm = new ATM();

            atm.StartTheATM();
        }
Exemplo n.º 5
0
 // this constructor will be used by the other one
 public NoCashState(int amountRemaining, ATM atmBeingUsed)
 {
     this.Atm = atmBeingUsed;
     this.DummyCashPresent = amountRemaining;
 }