I need some help from OOP guys to help me decide the structure of a pay rules engine I want to develop for employee's attendance. Finally I want a jar that takes csv input and returns csv output. This jar will take attendance shifts and rules as input and provide me back the outputs ie calculations from rules applied on those shifts like overtime hours and respective pay.
Basically I will have a GenericEngine
for normal employee's overtime hours and say some extended functionalities according to state overtime laws like one custom OregonEngine
, that will process a specific rule for premium hours(this wont be provided by GenericEngine)
Situation as I know it's going to be like:
RulesProcessor
will take input as shiftsList and rulesList.- If
GenericEngine
can process all the rules on all the shifts then it'll do it or ask specificEngine like OregonEngine to do so. - Every custom engine like
OregonEngine
can useGenericEngine
but not necessarily. RulesProcessor
should be able to do calculations using Generic and Custom engines. 5.Calculations has to be stored somewhere because some rule ,say weekly overtime, might require it.
Aucun commentaire:
Enregistrer un commentaire