public static IEmployee InitializeEmployee(EmployeeEnums.EmployeeType employeeType, EmployeeEnums.Level level)
 {
     IEmployee employee;
     switch (employeeType)
     {
         case EmployeeEnums.EmployeeType.Programmer:
             employee = new Programmer(level);
             break;
         case EmployeeEnums.EmployeeType.Manager:
             employee = new Manager(level);
             break;
         case EmployeeEnums.EmployeeType.CEO:
             employee = new CEO();
             break;
         default:
             throw new ArgumentException(string.Format("An employee of type {0} cannot be found", Enum.GetName(typeof(EmployeeEnums.EmployeeType), employeeType)));
     }
     return employee;
 }
Exemple #2
0
 internal Programmer(EmployeeEnums.Level level)
     : base(level)
 {
 }
Exemple #3
0
 internal Manager(EmployeeEnums.Level level)
     : base(level)
 {
 }