Got this interview question which i'm wondering about:
A software company designed an app that manages employees and, among other functions, calculates Salary.
The current structure which fits the customer's requirements is:
abstract Class Employee;
Class Manager extends Employee;
Class Engineer extends Employee;
The customer would now like to add the ability to support different types of salary calculations for employees who work on an hourly wage, monthly salary. Both Engineer and Manager can be either.
The customer also notified the software company that they will add a number of other types of salaries in the future.
The Question - How would you design this? Does if fall in any design pattern solution?
Thanks!