C++ Inheritance & Polymorphism: Constructors, Destructors, & Inheritance

C++ 20    |    Intermediate
  • 11 Videos | 1h 24m 2s
  • Includes Assessment
  • Earns a Badge
The order in which constructors and destructors are invoked on an object of a derived class in an inheritance hierarchy is a very important topic. Constructors are invoked in order from the top-most (most base-level) class, down to the most derived class. Destructors are invoked in the reverse order. Explore how constructors work in an inheritance hierarchy, the order in which the base and derived class constructors are invoked, and how initialization lists need to be used in the derived class. Discover how to use copy constructors and destructors in the context of inheritance. Learn how to set up an inheritance hierarchy for polymorphism. Finally, practice using objects in an inheritance hierarchy with variables of pointer and reference types. When you finish this course, you will have a solid foundation in constructors, destructors, and inheritance, setting the stage for runtime polymorphism and dynamic method dispatch.

WHAT YOU WILL LEARN

  • discover the key concepts covered in this course
    compare constructors in base classes and derived classes
    invoke base class constructors from derived classes
    access base class fields from the child class
    recall that constructors are not inherited
    work with copy constructors in inheritance hierarchies
  • work with destructors in inheritance hierarchies
    set up an inheritance hierarchy for polymorphism
    create pointers to derived and base class objects
    create references to derived and base class objects
    summarize the key concepts covered in this course

IN THIS COURSE

  • Playable
    1. 
    Course Overview
    1m 41s
    UP NEXT
  • Playable
    2. 
    Using Constructors in Inheritance Hierarchies
    7m 45s
  • Locked
    3. 
    Using Base Class Constructors in Child Classes
    10m 24s
  • Locked
    4. 
    Accessing Base Class Fields from the Child Class
    7m 14s
  • Locked
    5. 
    Using Base Class Constructors in Derived Classes
    8m 36s
  • Locked
    6. 
    Using Copy Constructors in Inheritance
    9m 13s
  • Locked
    7. 
    Using Destructors in Inheritance
    10m 7s
  • Locked
    8. 
    Setting up an Inheritance Hierarchy for Polymorphism
    9m 8s
  • Locked
    9. 
    Creating Pointers with Inheritance
    9m 27s
  • Locked
    10. 
    Creating References with Inheritance
    8m
  • Locked
    11. 
    Course Summary
    2m 26s

EARN A DIGITAL BADGE WHEN YOU COMPLETE THIS COURSE

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

Digital badges are yours to keep, forever.