C++ Inheritance & Polymorphism: Understanding & Using Polymorphism

C++    |    Intermediate
  • 15 videos | 2h 3m 57s
  • Includes Assessment
  • Earns a Badge
Rating 4.4 of 11 users Rating 4.4 of 11 users (11)
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 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

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

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.

YOU MIGHT ALSO LIKE

Rating 4.5 of 53 users Rating 4.5 of 53 users (53)
Rating 4.7 of 7 users Rating 4.7 of 7 users (7)
Rating 4.6 of 16 users Rating 4.6 of 16 users (16)

PEOPLE WHO VIEWED THIS ALSO VIEWED THESE

Rating 4.5 of 44 users Rating 4.5 of 44 users (44)
Rating 4.3 of 8 users Rating 4.3 of 8 users (8)
Course T-SQL Queries
Rating 4.3 of 218 users Rating 4.3 of 218 users (218)