public Acount(string owin, double blance) { this.blance = blance; this.owner = owin; this.state = new NormalState(this);//设置初始状态 Console.WriteLine($"开启账户余额{this.blance}"); }
public NormalState(AcountState state) { this.Acc = state.Acc; }
public OverdraftState(AcountState state) { this.Acc = state.Acc; }
public RestrictedState(AcountState state) { this.Acc = state.Acc; }