public Account(string owner, double initialAmount) { m_owner = owner; m_balance = initialAmount; m_state = new NormalState(this); //设置初始状态 }
public void SetState(AccountState state) { m_state = state; }