I have two classes PersonalDetails and ProfessionalDetails. Now I have to derive classes for permanent / Temp / consultant employee from PersonalDetails. The derived class should also contain information of ProfessionalDetails.

So I have some options

1. Derive the classes taking both as base
2. Derive the classes from PersonalDetails and add object of ProfessionalDetails.

I would like to know which is better in terms of coding, memory usage etc.


Thanks
bashish