Home - Rybd04/2143-OOP GitHub Wiki
Ryan Darden: OOP Terminology
Home
A class that cannot be instantiated on its own and is designed to be a base class for other classes. It contains at least one pure virtual function, which is a function declared with the = 0 syntax and has no implementation in the abstract class itself.
Access Modifiers Public, Private, Protected:
Public Members declared as public are accessible from anywhere in the program. Any code can read or modify these members.
Private Members declared as private are only accessible inside the class. They cannot be accessed or modified directly from outside the class. You need special functions (like getters and setters) to interact with private members.
Protected Members declared as protected are accessible within the class and its derived classes (subclasses), but not from outside the class hierarchy.
A map of classes and their relationships.
A class variable is a variable that is shared across all instances of a class. It is declared within the class, but outside of any instance methods
A class is a blueprint or template for creating objects. It defines a set of attributes and methods that are then used to create objects
Constructors A constructor is a special method that is automatically called when an object is created. It is used to initialize the object’s state
Destructors A destructor is a special method that is automatically called when an object is destroyed. It is used to clean up resources such as closing files or network connections.
It refers to the bundling of data and the methods that operate on that data into a single unit, typically a class. It also involves restricting direct access to some components of an object, which is a form of data hiding.
Encapsulation vs Information Hiding:
Information hiding is a specific aspect of encapsulation where you hide the internal details of a class from the outside world. It means that users of the class should not need to know about its internal workings, just how to use it.
Final Classes A class that can't have any subclasses.
Final Methods A method that can't be overridden by any subclasses.
the friend keyword is used to grant specific functions or classes access to the private and protected members of another class.
Inheritance is the mechanism by which one class (called the child or subclass) derives or inherits the features of another class (called the parent or superclass).
A variable that is defined in a class but belongs to each individual object (instance) of that class.
Typically represented using an abstract class that only contains pure virtual functions. It defines a set of behaviors (functions) that any derived class must implement, without providing any default implementation.
A member variable is any variable that is declared inside a class. It can either be an instance variable (specific to each object) or a class variable (shared across all instances).
When two or more methods in the same class have the same name but different parameter signatures (i.e., different types or number of arguments).
A method is a function that is defined inside a class and is used to perform operations using the data (attributes or member variables) of that class.
Allows a class to inherit properties and behaviors from more than one base class.
Allows built-in operators like +,-,*,==, and others to work with objects. It involves redefining the behavior of operators.
A feature that allows you to define multiple functions or operators with the same name but with different parameters or behaviors.
Allows objects of different classes to be treated as objects of a common superclass, typically through method overriding or method overloading (depending on the language).
A timeline of how objects talk to each other. Shows the order of function calls.
A map of all possible states of a system. Shows how the system changes over time
Static methods and static variables belong to the class itself rather than any instance of the class.
The blueprint for building software. Uses many diagrams including Use Case Diagrams, Class Diagrams, Sequence Diagrams, and State Diagrams.
A picture of what a user can do with the system.
Virtual Functions V‐Table and Dynamic Dispatch:
A function that can be overridden in a derived class. It allows a program to call the correct version of the function based on the type of the object being pointed to, not the type of the pointer.