public Context(State state) { this.state = state; }
public void SetState(State s) { current = s; }
public Work() { current = new ForenoonState(); }
public GoldState(State state) { this.Balance = state.Balance; this.Account = state.Account; Interest = 0.05; LowerLimit = 1000.00; UpperLimit = 1000000.00; }
public SilverState(State state) : this(state.Balance, state.Account) { }
public RedState(State state) { // Initialize this.Balance = state.Balance; this.Account = state.Account; Interest = 0.00; LowerLimit = -100.00; UpperLimit = 0.00; }