Depth in Inheritance Tree
From Maisqual Wiki
The Depth in Inheritance Tree (DIT) is the depth of inheritance of the class (i.e. number of ancestors in direct lineage) in the object-oriented paradigm. It has been introduced by Chidamber and Kemerer.
DIT relates to Bunge's notion of the scope of properties. DIT is a measure of how many ancestor classes can potentially affect this class.
- The deeper a class is in the hierarchy, the greater the number of methods it is likely to inherit, making it more complex to predict its behavior.
- Deeper trees constitute greater design complexity, since more methods and classes are involved.
- The deeper a particular class is in the hierarchy, the greater the potential reuse of inherited methods.
- In cases involving multiple inheritance, the DIT will be the maximum length from the node to the root of the tree.
- In Java where all classes inherit Object the minimum value of DIT is 1.
- Original paper from Chidamber and Kemerer : A_Metrics_Suite_for_Object_Oriented_Design
- Subramaniam et al. compared it to other metrics in some contexts: Empirical Study of CK metrics for object-oriented design complexity: Implications for software defects