C++ Inheritance & Polymorphism: Constructors, Destructors, & Inheritance
C++
| 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 courseCompare constructors in base classes and derived classesInvoke base class constructors from derived classesAccess base class fields from the child classRecall that constructors are not inheritedWork with copy constructors in inheritance hierarchies
-
Work with destructors in inheritance hierarchiesSet up an inheritance hierarchy for polymorphismCreate pointers to derived and base class objectsCreate references to derived and base class objectsSummarize the key concepts covered in this course
IN THIS COURSE
-
1m 41s
-
7m 45s
-
10m 24s
-
7m 14s
-
8m 36s
-
9m 13s
-
10m 7s
-
9m 8s
-
9m 27s
-
8m
-
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 on some of our courses, which can be shared on any social network or business platform.
Digital badges are yours to keep, forever.