lundi 11 janvier 2016

Decision on design pattern [on hold]

Situation:

Design and develop a system to calculate employee overtime pay calculator. There can be multiple organisations. Each organisation can have multiple division. Each division can have multiple employees. Each division has multiple rules to calculate overtime based on weekly working hours (wwh). Overtime shall be calculated by overtimeCalculatorEngine.

Below are rules.

For CompanyA:

if employee is contractor and wwh is less than or equal to 40 then overtime is null, if wwh is more than 40 and less than 60 then overtime is 1.5 times of extra hrs and if wwh is more than 60 overtime is 2 times extra hrs.

if employee is permanent and wwh is less than or equal to 45 then overtime is null, if wwh is more than 45 and less than 60 then overtime is 1.5 times of extra hrs and if wwh is more than 60 overtime is 2 times extra hrs.

CompanyB:

if employee is contractor and wwh is less than or equal to 40 then overtime is null, if wwh is more than 40 and less than 60 then overtime is 1.5 times of extra hrs, if wwh is more than 60 overtime is 2 times extra hrs and if wwh is more than 70 extra car allowance of .1 times of overtime of previous condition is also given.

if employee is contractor and wwh is less than or equal to 45 then overtime is null, if wwh is more than 45 and less than 60 then overtime is 1.5 times of extra hrs, if wwh is more than 60 overtime is 2 times extra hrs and if wwh is more than 70 extra car allowance of .15 times of overtime of previous condition is also given.

The system shall be designed in such a way that adding a new rule, new division and new organisation shall not be a pain.

Aucun commentaire:

Enregistrer un commentaire