Monday, August 13, 2007

A Money Class for Free

I am working in the insurance IT sector for almost ten years. There is usually no rocket science in the insurance software - the few things they should do reasonably well is calculating money and performing date arithmetic. I have been always surprised how weak are implementations of money and date arithmetic in these systems. In an attempt to save the world (again), here is my Money class, with documentation. I have made the class immutable as I am now a proud member of the Mutability haters group :-).