# Module 18: Inheritance

MODULE OVERVIEW

This module introduces inheritance in C++ programming and explains how classes
can derive properties and behaviours from other classes.



Learners will explore different types of inheritance and understand how
inheritance supports code reuse and the development of structured
object-oriented programs.



The module also covers virtual base classes, abstract base classes, and the role
of constructors and destructors in derived classes, helping learners understand
how inheritance works in more advanced C++ programming scenarios.






WHAT WILL BE COVERED


18.1 TYPES OF INHERITANCE

Explore the different types of inheritance used in C++ programming. Understand
how classes can inherit from other classes and how inheritance relationships are
structured to support code reuse and object-oriented design.


18.2 VIRTUAL BASE CLASSES AND ABSTRACT BASE CLASSES

Understand the concepts of virtual base classes and abstract base classes in
C++. Learn how virtual base classes help address inheritance-related structures
and how abstract base classes provide a foundation for defining interfaces and
common behaviour for derived classes.


18.3 CONSTRUCTOR AND DESTRUCTOR IN DERIVED CLASS

Learn how constructors and destructors work in derived classes. Understand how
constructors are involved in object initialisation across inheritance
hierarchies and how destructors support object cleanup when derived objects are
destroyed.


SKILLS YOU WILL GAIN

 * Understanding inheritance in C++.

 * Identifying different types of inheritance.

 * Working with virtual base classes.

 * Understanding abstract base classes.

 * Managing constructors in derived classes.

 * Understanding destructors in inheritance hierarchies.


LEARNING OUTCOMES

By the end of this module, learners will be able to:

 * Explain the concept and purpose of inheritance in C++.

 * Identify and implement different types of inheritance.

 * Understand the role of virtual base classes.

 * Work with abstract base classes.

 * Understand constructor behaviour in derived classes.

 * Explain how destructors work within inheritance hierarchies.


CERTIFICATION ALIGNMENT

This module develops inheritance and advanced object-oriented programming
concepts that support the development of structured and reusable C++
applications. The concepts covered contribute to the programming skills learners
build throughout the C and C++ training curriculum.


CONTINUE TO THE NEXT MODULE

Continue to Module 19: Working with Files
[https://teamacademy.help.center/article/1351-module-19-working-with-files] to
learn about file operations, file pointers, file pointer manipulation and
updating files using random-access techniques.