Depth of inheritance definition
- It is a code quality metric.
- Depth of Inheritance is Code Metric which checks the Code Health.
Depth of Inheritance purpose
- The deeper the depth of inheritance, the more potential there is for causing breaking changes in the code when modifying a base class.
Depth of Inheritance practice
- Depth of Inheritance indicates the number of different classes that inherit from one another, all the way back to the base class.
- Depth of Inheritance is similar to class coupling in that a change in a base class can affect any of its inherited classes.
- Depth of Inheritance is similar to class coupling however the difference is that in Depth of Inheritance, a base class can affect any of its inherited classes.
- Depth of Inheritance implies the maximum length from the node to the root of a code tree.
- A low number for depth implies less complexity but also the possibility of less code reuse through inheritance.
- In addition, a high number for depth implies more potential for code reuse through inheritance but also higher complexity with a higher probability of errors in the code.
More informations for the Scrum PSD certification here.
Updated : 01/10/2021