1/16
These flashcards cover key concepts of inheritance and composition in object-oriented programming based on the lecture notes.
Name | Mastery | Learn | Test | Matching | Spaced |
|---|
No study sessions yet.
Inheritance
An 'is-a' relationship allowing new classes to be created from existing classes.
Derived Class
A new class created from an existing class, inheriting properties from the base class.
Base Class
The original class from which derived classes are created.
Single Inheritance
A derived class that has a single base class.
Multiple Inheritance
A derived class that has more than one base class.
Public Inheritance
All public members of the base class are inherited as public members by the derived class.
Composition
A 'has-a' relationship where one or more member(s) of a class are objects of another class type.
Encapsulation
Combines data and operations on data in a single unit.
Polymorphism
The ability to use the same expression to denote different operations.
Virtual Functions
Functions in C++ that allow run-time selection of appropriate member functions.
Destructors
Methods that deallocate dynamic memory allocated by objects of a class.
Constructor
A special method used to initialize objects when they are created.
Scope Resolution Operator (::)
Used to specify which class's member function is being referred to when overriding.
Access Specifiers
Modifiers that determine how members of a class can be accessed (public, protected, private).
UML Class Diagram
A standardized way to visualize the design of a system, showing classes and their relationships.
Member Initialization List
A list used in constructors to initialize member variables before the constructor body executes.
I/O Stream Classes
Classes such as istream and ostream used for handling input and output operations.