C++ Inheritance & Polymorphism: Understanding & Using Polymorphism

C++ 20    |    Intermediate
  • 15 videos | 2h 3m 57s
  • Includes Assessment
  • Earns a Badge
Inheritance forms the basis for polymorphism, specifically runtime polymorphism, which is a powerful object-oriented programming construct. Runtime polymorphism involves a pointer or a reference of the base class type holding an object of the derived class. The beauty of runtime polymorphism is that when virtual methods are invoked on this pointer, the derived class versions are executed. You will start this course by defining name hiding and how most methods on C++ objects are, by default, statically dispatched. You will then learn about polymorphism and dynamic dispatch, which is accomplished using the virtual keyword. Finally, you will learn how the ‘override' and 'final' specifications can be used to achieve precise semantics and reduce the scope of bugs and typos in your C++ programs.


  • discover the key concepts covered in this course
    outline the concept of name hiding
    demonstrate ways of getting around name hiding
    recognize scenarios in which static binding is dangerous
    contrast compile time and runtime polymorphism
    explore the mechanics of runtime polymorphism
    demonstrate how to use the virtual keyword
    enable runtime polymorphism using the ‘virtual’ keyword
  • demonstrate the use of runtime polymorphism in different scenarios
    identify the costs associated with runtime polymorphism
    recall that the signatures of dynamically dispatched methods must be the same
    demonstrate the covariance edge case in dynamic method dispatch
    outline the use of the override specification
    disable overriding and inheritance using the ‘final’ keyword
    summarize the key concepts covered in this course


  • 1m 35s
  • 10m 44s
  • Locked
    3.  Exploring Finer Points of Name Hiding
    9m 26s
  • Locked
    4.  Understanding How Static Binding Can Be Dangerous
    11m 35s
  • Locked
    5.  Polymorphism
    9m 36s
  • Locked
    6.  Mechanics of Polymorphism
    5m 43s
  • Locked
    7.  Introducing the 'virtual' Keyword
    9m 46s
  • Locked
    8.  Exploring Runtime Polymorphism
    7m 53s
  • Locked
    9.  Using Runtime Polymorphism with References
    9m 34s
  • Locked
    10.  Viewing Resources Used in Dynamic Method Dispatch
    5m 55s
  • Locked
    11.  Exploring Problems Related to Runtime Polymorphism
    9m 32s
  • Locked
    12.  Understanding Covariance
    10m 39s
  • Locked
    13.  Understanding the 'override' Specification
    7m 48s
  • Locked
    14.  Using the 'final' Keyword
    10m 13s
  • Locked
    15.  Course Summary
    3m 57s


Skillsoft is providing you the opportunity to earn a digital badge upon successful completion on some of our courses, which can be shared on any social network or business platform.

Digital badges are yours to keep, forever.