C++ Inheritance & Polymorphism: Understanding & Using Polymorphism
C++
| 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.
WHAT YOU WILL LEARN
-
Discover the key concepts covered in this courseOutline the concept of name hidingDemonstrate ways of getting around name hidingRecognize scenarios in which static binding is dangerousContrast compile time and runtime polymorphismExplore the mechanics of runtime polymorphismDemonstrate how to use the virtual keywordEnable runtime polymorphism using the ‘virtual’ keyword
-
Demonstrate the use of runtime polymorphism in different scenariosIdentify the costs associated with runtime polymorphismRecall that the signatures of dynamically dispatched methods must be the sameDemonstrate the covariance edge case in dynamic method dispatchOutline the use of the override specificationDisable overriding and inheritance using the ‘final’ keywordSummarize the key concepts covered in this course
IN THIS COURSE
-
1m 35s
-
10m 44s
-
9m 26s
-
11m 35s
-
9m 36s
-
5m 43s
-
9m 46s
-
7m 53s
-
9m 34s
-
5m 55s
-
9m 32s
-
10m 39s
-
7m 48s
-
10m 13s
-
3m 57s
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.