Beispiel #1
0
 // Constructor
 public Account(string owner)
 {
     // New accounts are 'Silver' by default
     this._owner = owner;
     this._state = new SilverState(0.0, this);
 }
Beispiel #2
0
        // Overloaded constructors

        public SilverState(SimpleState state) :
            this(state.Balance, state.Account)
        {
        }
Beispiel #3
0
 // Overloaded constructors
 public GoldState(SimpleState state)
     : this(state.Balance, state.Account)
 {
 }
Beispiel #4
0
 // Constructor
 public RedState(SimpleState state)
 {
     this.balance = state.Balance;
     this.account = state.Account;
     Initialize();
 }