using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace HRLibrary
{
    public class CompanyFactory
    {
        private static CompanyFactory MyFactory = new CompanyFactory();

        private CompanyFactory() { }

        public static CompanyFactory GetInstance() {
            return MyFactory;
        }

        public static Company CreateCompanyA() {
            Employee emp1 = new Employee("AA111", "John", 10);
            Employee emp2 = new Employee("AA222", "David", 12);
            Employee emp3 = new Employee("AA333", "Mary", 7);

            Company result = new Company();
            result.AddEmployee(emp1);
            result.AddEmployee(emp2);
            result.AddEmployee(emp3);

            return result;
        }
        public static Company CreateCompanyB()
        {
            Employee emp1 = new Employee("BB123", "Ken", 8);
            Employee emp2 = new Employee("BB245", "Richard", 14);
            Employee emp3 = new Employee("BB566", "Jacky", 9);

            Company result = new Company();
            result.AddEmployee(emp1);
            result.AddEmployee(emp2);
            result.AddEmployee(emp3);

            return result;
        }
        public static List<Computer> CreateComputers() {
            List<Computer> result = new List<Computer>();
            result.Add(new Computer("11111", "AA111"));
            result.Add(new Computer("22222", "BB566"));
            result.Add(new Computer("33333", "AA111"));
            result.Add(new Computer("44444", "AA222"));
            result.Add(new Computer("55555", "AA333"));
            result.Add(new Computer("66666", "AA333"));
            result.Add(new Computer("77777", "AA111"));
            result.Add(new Computer("88888", "AA111"));
            return result;
        }

    }
}
