//public bool CreateNewEmployee //comment this out - right click on interface and "Implement Interface" public bool Create(string first, string last, DateTime birthday, out IEmployee employee) { //Create the most recent and capable Employee object but return the interface employee = null; Employee3 employee3 = new Employee3(first, last, birthday); if (employee3.IsValid) { employee = (IEmployee)employee3; return true; } return false; //throw new NotImplementedException(); }
public static IEmployee CreateEmployee(string firstname, string lastname, DateTime birthdate) { Employee3 employee = new Employee3(firstname, lastname, birthdate); return employee; }