Mini-Project Inheritance Relationship (10 Marks) Meilir Page-Jones, through his consulting company, identified a set of
Posted: Tue Jul 05, 2022 11:41 am
Mini-Project
Inheritance Relationship
(10 Marks)
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 client's 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.
Q3.R1. Draw an inheritance diagram to model the relationship between the key classes in the organization
chart?
Inheritance Relationship
(10 Marks)
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 client's 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.
Q3.R1. Draw an inheritance diagram to model the relationship between the key classes in the organization
chart?