public CompanyFactory(string companyName, IPayrollSystem payrollSystem) { this._companyName = companyName; this._payroll = payrollSystem; this._departments = new List <Department>(); // This is the constructor of the asbstract base class calling the factory method // This is ALWAYS neccessary in a factory pattern and what makes it a factory pattern. this.CreateDepartments(); }
public SoftwareCompanyFactory(string companyName, IPayrollSystem payrollSystem) : base(companyName, payrollSystem) { }