public static Employee Create(String type) { Employee employee = null; int id = EmployeeRandomizer.CreateId(); String name = EmployeeRandomizer.CreateName(); int year = EmployeeRandomizer.CreateYear(); String department = EmployeeRandomizer.CreateDepartment(); switch (type) { case "Employee": employee = new Employee(id, name, year, department); break; case "Manager": employee = new Manager(id, name, year, department, department); break; case "Director": employee = new Director(id, name, year, "Management", "Management", 5000); break; } return(employee); }
public Employee Create() { Director director = new Director(EmployeeRandomizer.CreateId(), EmployeeRandomizer.CreateName(), EmployeeRandomizer.CreateYear(), "Management", "Management", 5000); return(director); }
public Employee Create() { Employee employee = new Employee(EmployeeRandomizer.CreateId(), EmployeeRandomizer.CreateName(), EmployeeRandomizer.CreateYear(), EmployeeRandomizer.CreateDepartment()); return(employee); }
public Employee Create() { string department = EmployeeRandomizer.CreateDepartment(); Manager manager = new Manager(EmployeeRandomizer.CreateId(), EmployeeRandomizer.CreateName(), EmployeeRandomizer.CreateYear(), department, department); return(manager); }