示例#1
0
 // This constructor will create new state taking values from old state
 public CardValidatedState(ATMState state)    
     :this(state.DummyCashPresent, state.Atm)
 {
     
 }
 // This constructor will create new state taking values from old state
 public CardValidatedState(ATMState state)
     : this(state.DummyCashPresent, state.Atm)
 {
 }
 // This constructor will create new state taking values from old state
 public CashWithdrawnState(ATMState state)
     : this(state.DummyCashPresent, state.Atm)
 {
 }
示例#4
0
 // This constructor will create new state taking values from old state
 public NoCashState(ATMState state)      
     :this(state.DummyCashPresent, state.Atm)
 {
     
 }
示例#5
0
 // This constructor will create new state taking values from old state
 public CashWithdrawnState(ATMState state)      
     :this(state.DummyCashPresent, state.Atm)
 {
     
 }
示例#6
0
 // This constructor will create new state taking values from old state
 public NoCardState(ATMState state)
     : this(state.DummyCashPresent, state.Atm)
 {
 }
示例#7
0
文件: ATM.cs 项目: fm107/Shared
 public ATM()
 {
     currentState = new NoCardState(1000, this);
 }
示例#8
0
 public ATM()
 {
     currentState = new NoCardState(1000, this);
 }