August 2018
Beginner
594 pages
22h 33m
English
The depth of inheritance tree (DIT) is a code metric that is specific to object-oriented programming. It measures the maximum length between a node and the root node in a class hierarchy. Take a look at the following diagram of a simple class hierarchy:

In this example, Class C inherits from Class B, which inherits from Class A. The DIT of Class A is 0, the DIT of Class B is 1, and the DIT of Class C is 2. A higher number for the DIT indicates a greater level of complexity. It also means there is a larger number of attributes and methods being inherited, which means there is code reuse through inheritance but ...