Welcome to the landing page of our course on "Computer Programming with C++: Inheritance". This repository serves as your starting point to delve into the core concepts of inheritance in C++, one of the fundamental pillars of object-oriented programming (OOP).
Throughout our journey, we've covered various facets of inheritance, starting from its basic principles to more advanced topics. Below is an overview of the key concepts that we have explored, each accompanied by its dedicated README and illustrative source code examples.
- Inheritance Overview
- Inheritance Terminology and Notation
- Inheritance vs Composition
- Deriving Classes from Existing Classes
- Protected Members and Class Access
- Constructors and Destructors in Inheritance
- Passing Arguments to Base Class Constructors
- Copy/Move Constructors and Operator= with Derived Classes
- Redefining Base Class Methods
- Multiple Inheritance
We introduced the concept of inheritance, explaining how it allows for creating new classes that are built upon existing classes. Read more about Inheritance Overview
Key terms like "base class" and "derived class" were defined, along with the notation used in C++ to express inheritance relationships. Read more about Inheritance Terminology and Notation
We compared inheritance and composition, discussing when to use each in your designs. Read more about Inheritance vs Composition
The process and syntax for creating derived classes were covered, highlighting the extension of functionality. Read more about Deriving Classes from Existing Classes
We explained the protected access specifier and how it differs from private and public, especially in an inheritance context. Read more about Protected Members and Class Access
The behavior of constructors and destructors in derived classes was discussed, along with the order of their invocation. Read more about Constructors and Destructors in Inheritance
Techniques for initializing base class members from derived classes were presented. Read more about Passing Arguments to Base Class Constructors
We examined the implications of copying and moving derived class objects and how to properly manage resources in this context. Read more about Copy/Move Constructors and Operator= with Derived Classes
The concept of method overriding and how derived classes can redefine the behavior of base class methods was explored. Read more about Redefining Base Class Methods
We navigated through the complexities of a class inheriting from more than one base class, addressing the diamond problem with virtual inheritance. Read more about Multiple Inheritance
To get started with the course, simply clone this repository and follow the READMEs in the order listed above. Each topic's folder contains detailed explanations and corresponding source code examples to reinforce learning through practice.