Got this interview question, which I'm interested in:
A software company has developed an application that manages employees and, among other functions, calculates wages.
Current structure according to customer requirements:
abstract Class Employee;
Class Manager extends Employee;
Class Engineer extends Employee;
Now the client would like to add the ability to support various types of payroll for employees who work on hourly wages, monthly wages. Both Engineer and Manager can be either.
The client also notified the software company that in the future they will add a number of other types of salaries.
Question: How would you develop this? Could any design template fall?
Thank!
Turd