How about the following structure:
Earnings and Deductions are abstract classes and inherited by concrete concepts.
In order to calculate a Salary for a month, you just need to create a set of Earnings and Deductions and to assign them to a corresponding Salary. The Salary's amount is calculated automatically (therefore "derived" att), so no worry about that.
The most important decision is how to create Earning and Deduction objects for a month. A possible way is to add a method in Salary that creates Earnings and Deductions according to a well defined algorithm and connects them with itself. Salary object has all the info needed to calculate this (Person, month). I like this method, because all the knowledge remains localized, the whole structure remains nicely closed and encapsulated.