コード例 #1
0
ファイル: CardValidatedState.cs プロジェクト: fm107/Shared
 // this constructor will be used by the other one
 public CardValidatedState(int amountRemaining, ATM atmBeingUsed)
 {
     this.Atm = atmBeingUsed;
     this.DummyCashPresent = amountRemaining;
 }
コード例 #2
0
 // this constructor will be used by the other one
 public CashWithdrawnState(int amountRemaining, ATM atmBeingUsed)
 {
     this.Atm = atmBeingUsed;
     this.DummyCashPresent = amountRemaining;
 }
コード例 #3
0
 // this constructor will be used by the other one
 public CardValidatedState(int amountRemaining, ATM atmBeingUsed)
 {
     this.Atm = atmBeingUsed;
     this.DummyCashPresent = amountRemaining;
 }
コード例 #4
0
ファイル: Program.cs プロジェクト: fm107/Shared
        private static void TestWithStatePattern()
        {
            ATM atm = new ATM();

            atm.StartTheATM();
        }
コード例 #5
0
ファイル: NoCashState.cs プロジェクト: fm107/Shared
 // this constructor will be used by the other one
 public NoCashState(int amountRemaining, ATM atmBeingUsed)
 {
     this.Atm = atmBeingUsed;
     this.DummyCashPresent = amountRemaining;
 }