Question
Meilir Page-Jones, through his consulting company, identified a set of misuses of inheritance. In some cases, these misuses led to lengthy and bloody disputes and
Meilir Page-Jones, through his consulting company, identified a set of misuses of inheritance. In some cases, these misuses led to lengthy and bloody disputes and gruesome implementations; in one case, it led to the destruction of the development team. In all cases, the error was in not enforcing a generalization (a-kind-of) semantics. In one case, the inheritance hierarchy was inverted: Board Member was a superclass of Manager, which was a superclass of Employee. However, in this case, an Employee is not a-kind-of Manager, which is not a-kind-of Board Member. In fact, the opposite was true. However, if you think of an Organization Chart, a Board Member is superior to a Manager, which is superior to an Employee. In another example, the clients firm attempted to use inheritance to model a membership idea (e.g., Student is a member of a club). However, the club should have had an attribute that contained the student members. In the other examples, inheritance was used to implement an association relationship and an aggregation relationship.
Q2. Demonstrate how are the classes in the inheritance hierarchy related? Are the classes related through a generalization/specialization (a-kind-of) semantics? Or, are they related via some association, aggregation, or membership type of relationship.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started