This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
I am hoping for some advice regarding inheritance.
Currently I am working in a system incorporating employees of various types. The base class is Employee, with other classes in the hierarchy requiring additional functionality and extending this class.
My question is one of good design. What is the best way to represent this relationship while allowing the type of an employee to be changed dynamically? And are there any existing design patterns that can be applied?
I have included a quick diagram to illustrate the problem.
Dan. [ March 29, 2006: Message edited by: Daniel Shilcock ]