public static Employee Create(EmployeeType role) { if (role == EmployeeType.ENGINEER) { return(new Employee(new Engineer())); } else if (role == EmployeeType.MANAGER) { return(new Employee(new Manager())); } else { return(new Employee(new SalesMan())); } }
private Employee(EmployeeType role) { Role = role; }