Summing Up
Inheritance is a very powerful but abstract feature. It primarily benefits programmers of larger systems that will evolve over time. As you have seen throughout this book, system enhancement, repair, and refactoring represent some of the most important activities programmers perform, far outweighing the time and effort spent on new programs and systems. So inheritance has a critical part to play in reducing the risk of introducing errors during maintenance and minimizing the effort needed to add new features.
You have seen how to create a derived class from a superclass, and how a reference to a superclass can end up with a call to derived class functions through the use of virtual (a feature called class polymorphism). You have learned ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access