I want to implement a database driven payroll system using CSharp. I already did it once, but the implementation sucks so I want to do it again and do it right.
My first thought is to create a static class calculator which would simply hold all the formulas, one private method per formula. One main public method "Calculate" which would take a ref Employee type object as a parameter. Take data from the object, apply the formulas and set the objects properties, but my guess is this would probably suck.
One class with a bunch of properties for holding all the "(algebraic) constants". One class containing and managing the object. This class would deserialize the class holding all the data and serialize on app exit. The calculator would use this class to get data and apply the formulas to make changes to the "Employee". These "constants" would be changable from inside the application.
I am not good when it comes to structuring applications and a lot of my implementations end up sucking... I realize that I hate it when I need to make changes to the application.