// this constructor will be used by the other one public CardValidatedState(int amountRemaining, ATM atmBeingUsed) { this.Atm = atmBeingUsed; this.DummyCashPresent = amountRemaining; }
// this constructor will be used by the other one public CashWithdrawnState(int amountRemaining, ATM atmBeingUsed) { this.Atm = atmBeingUsed; this.DummyCashPresent = amountRemaining; }
private static void TestWithStatePattern() { ATM atm = new ATM(); atm.StartTheATM(); }
// this constructor will be used by the other one public NoCashState(int amountRemaining, ATM atmBeingUsed) { this.Atm = atmBeingUsed; this.DummyCashPresent = amountRemaining; }