This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori 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 ]