I am maintaining a custom built and highly OO e-commerce application. The original designer made a few assumptions like: - there will never be more than 3 types of sales tax (state, national & hamonized) - each type of sales tax can have only one rate. - each state will be assigned one of the three tax types.
He should have known better, but I guess it seemed reasonable at the time... All of a sudden each state is settings its own "harmonized" tax rate.
Problem: 3 levels down the object stack, I have a tax calculation method that uses only amount and tax type. Now I am faced with the task of a pretty big restructure of a application that I have little understanding or little budget to learn
I am inclined to stuff the state code into a session value and do a bit of hard-coded calculations on the other end. (1 day) instead of a re-structure (1-2 weeks??)
Is it my imagination or do OO applications have a bigger learning curve and can be harder to maintain when the business rules take an unexpected turn?