Skip to Content
C++20 for Programmers: An Objects-Natural Approach, 3rd Edition
book

C++20 for Programmers: An Objects-Natural Approach, 3rd Edition

by Paul Deitel, Harvey Deitel
April 2022
Intermediate to advanced
1012 pages
38h 1m
English
Pearson
Content preview from C++20 for Programmers: An Objects-Natural Approach, 3rd Edition

10. OOP: Inheritance and Runtime Polymorphism

Objectives

In this chapter, you’ll:

  • Use traditional and modern inheritance idioms, and understand base classes and derived classes.

  • Understand the order in which C++ calls constructors and destructors in inheritance hierarchies.

  • See how runtime polymorphism can make programming more convenient and systems more easily extensible.

  • Use override to tell the compiler that a derived-class function overrides a base-class virtual function.

  • Use final at the end of a function’s prototype to indicate that function may not be overridden.

  • Use final after a class’s name in its definition to indicate that a class cannot be a base class.

  • Perform inheritance with abstract and concrete classes.

  • See how C++ can implement ...

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.
Start your free trial

You might also like

Designing Data-Intensive Applications, 2nd Edition

Designing Data-Intensive Applications, 2nd Edition

Martin Kleppmann, Chris Riccomini

Publisher Resources

ISBN: 9780136905776