C++ Inheritance & Polymorphism: Using Inheritance for is-a Relationships

C++ 20    |    Intermediate
  • 14 Videos | 1h 33m 3s
  • Earns a Badge
Inheritance is a powerful, object-oriented language construct in which one class can be related to another class using an is-a relationship. Using inheritance, you can construct complicated class hierarchies in which one class is a parent or a base of another class. Is-a relationships are a great way of performing object-oriented design and are complemented by has-a relationships, which are implemented using composition, rather than inheritance. Explore inheritance relationships by setting up an inheritance hierarchy in C++ and specifying one class as the parent of another class. Then discover how member variables and methods are accessible from the drive class, as well as from external code. Finally, investigate base class access specifiers, and find out how they work with member access specifiers. When you're finished, you'll clearly understand how to use inheritance for is-a relationships and how to identify uses for private inheritance.

WHAT YOU WILL LEARN

  • discover the key concepts covered in this course
    recall how is-a relationships are modeled with inheritance
    contrast is-a relationships and inheritance with has-a relationships and composition
    inherit using public inheritance
    access members of base and derived classes
    compare public and private members of base classes
    use the protected access modifier for derived and external classes
  • differentiate the public, private, and protected access modifiers
    recall how private, public, and protected inheritance works
    use the base class access specifier
    use ‘protected’ as the base class access specifier
    implement private inheritance
    access fields from parent classes in child classes with the using keyword
    summarize the key concepts covered in this course

IN THIS COURSE

  • Playable
    1. 
    Course Overview
    1m 36s
    UP NEXT
  • Playable
    2. 
    Inheritance
    7m 57s
  • Locked
    3. 
    Inheritance and Composition
    4m 57s
  • Locked
    4. 
    Using Public Inheritance
    9m 14s
  • Locked
    5. 
    Using Members of Classes in Inheritance Hierarchies
    7m 41s
  • Locked
    6. 
    Accessing Members of Base Classes from Child Classes
    6m 43s
  • Locked
    7. 
    Using the 'protected' Access Modifier
    5m 48s
  • Locked
    8. 
    Access Modifiers
    5m 17s
  • Locked
    9. 
    Access Modifiers with Inheritance
    9m 46s
  • Locked
    10. 
    Using the Base Class Access Specifier
    6m 52s
  • Locked
    11. 
    Using 'protected' as the Base Class Access Specifier
    9m 52s
  • Locked
    12. 
    Using Private Inheritance
    6m 12s
  • Locked
    13. 
    Bypassing Access Modifiers Using 'using'
    8m 25s
  • Locked
    14. 
    Course Summary
    2m 43s

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.