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 courserecall how is-a relationships are modeled with inheritancecontrast is-a relationships and inheritance with has-a relationships and compositioninherit using public inheritanceaccess members of base and derived classescompare public and private members of base classesuse the protected access modifier for derived and external classes
-
differentiate the public, private, and protected access modifiersrecall how private, public, and protected inheritance worksuse the base class access specifieruse ‘protected’ as the base class access specifierimplement private inheritanceaccess fields from parent classes in child classes with the using keywordsummarize the key concepts covered in this course
IN THIS COURSE
-
1.Course Overview1m 36sUP NEXT
-
2.Inheritance7m 57s
-
3.Inheritance and Composition4m 57s
-
4.Using Public Inheritance9m 14s
-
5.Using Members of Classes in Inheritance Hierarchies7m 41s
-
6.Accessing Members of Base Classes from Child Classes6m 43s
-
7.Using the 'protected' Access Modifier5m 48s
-
8.Access Modifiers5m 17s
-
9.Access Modifiers with Inheritance9m 46s
-
10.Using the Base Class Access Specifier6m 52s
-
11.Using 'protected' as the Base Class Access Specifier9m 52s
-
12.Using Private Inheritance6m 12s
-
13.Bypassing Access Modifiers Using 'using'8m 25s
-
14.Course Summary2m 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.