Employee factory:
— Write an abstract Employee
class with name
, type
, and payment
attributes (and corresponding accessor functions).
- Extend Employee with at least two child classes that represent types of employees (e.g.: salaried, hourly, contract, permanent, etc)
- Create an
EmployeeFactory
class with amakeEmployee
method that takes two Strings (employee name and employee type) and returns an Employee object constructed from the corresponding child class based on thetype
parameter.