In the design stage of the software development life cycle, we determine how our classes should be organized for efficiency, reuse, speed, structure, and so on.
Structure is an important consideration.
And many programmers go inheritance-crazy once they ve figured out how powerful it is. But inheritance is not always logical or desirable when we look at our software at the source-code level. We assign certain responsibility to classes and determine the roles they play and the services they provide in an application. While it might seem natural to inherit from the Agent class to model an Agent role played by someone who s not necessarily an agent, it does present problems. For starters, there s the question of what gets exposed in the child class in terms of information, methods and fields inherited from the parent class.