//Constructor public InsurancePolicy(string number, string name, string desc, decimal premium, DateTime payDate, IPolicyDuration duration, DateTime endDate, List <Rider> rAL, Customer customer) { _number = number; _name = name; _desc = desc; _premium = premium; _payDate = payDate; _endDate = endDate; riderAvailableList = rAL; ActiveState = new Policy_ActiveState(this); LapsedState = new Policy_LapsedState(this); TerminatedState = new Policy_TerminatedState(this); _duration = duration; _customer = customer; AutoState(); }
public void SetPolicyState(IPolicyState state) { _state = state; }