Inheritance is one of the main concepts of object-oriented technology. It
is claimed that the use of inheritance improves productivity and
decreases development time.
John Daly et al. reported on two experiments evaluating the effects of
inheritance depth on program maintenance. They found that maintenance was
performed significantly quicker for software using three levels of
inheritance, compared to equivalent `flattened' software without
inheritance. A second experiment found that maintenance for software
using five levels of inheritance tended to be slightly slower
than for equivalent software without inheritance.
We report on similar experiments on the same question. Our results
contradict those mentioned above. Several crucial changes were made to
the setup. In particular longer and more complex programs were used, an
inheritance diagram was available to the subjects, and we used more and
different kinds of maintenance tasks. Furthermore, our experiment design
compares zero level, three level and five level inheritance directly in
The results suggest that there is a tendency that deeper inheritance
may complicate program understanding. ... mehrBut the effect depends rather on
other factors such as complexity of the program and type of
maintenance task than on inheritance
depth. We found a high correlation between maintenance time and the
number of methods to trace to gain program understanding. Further
work should be done to identify other influence factors.