1/23
Midterm Preparation
Name | Mastery | Learn | Test | Matching | Spaced |
|---|
No study sessions yet.
OOP
Is a programming paradigm centered around the concept of objects, which can represent real-world entities or abstract concepts.
Modularity
Refers to the design principle of breaking down a program into smaller, independent, and reusable units called modules (in OOP, these are often classes and objects).
Reusability
Is the ability to use existing code or components in multiple applications or situations without rewriting them from scratch. This is achieved by designing classes, methods, and objects in a way that they can be easily adapted or extended for different purposes.
Maintainability
Refers to how easy it is to update, improve, and fix a program after it has been developed. A maintainable program is designed in a way that changes or bug fixes can be made without breaking other parts of the system.
Classes
The key concepts of Object-Oriented Programming.
Are user-defined data types that act as the blueprint for individual objects, attributes and methods.
Objects
The key concepts of Object-Oriented Programming.
Are instances of a class created with specifically defined data. It correspond to real-world objects or an abstract entity.
Methods
Are functions that are defined inside a class that describe the behaviors of an object. Each method contained in class definitions starts with a reference to an instance object. Additionally, the subroutines contained in an object are called instance methods. Programmers use methods for reusability or keeping functionality encapsulated inside one object at a time.
Attributes
Are defined in the class template and represent the state of an object. Objects will have data stored in the attributes field. Class attributes belong to the class itself.
Encapsulation
The primary principles of OOP.
The principle of bundling data (attributes) and methods (functions) that operate on the data into a single unit called a class. It hides the internal state and only exposes the necessary parts of an object to the outside world. A fundamental concept in object-oriented programming (OOP) that involves bundling data and methods that operate on that data within a single unit, typically a class.
Access Modifiers
Key concept of Encapsulation
Control the visibility of class members (e.g., public, private, protected).
Getters and Setters
Key concept of Encapsulation
Methods used to access and update private data
Data Hiding
Key concept of Encapsulation
Protects the object's internal state from unintended interference.
Inheritance
The primary principles of OOP.
It is the principle that allows a new class (subclass or derived class) to inherit attributes and methods from an existing class (superclass or base class). This promotes code reuse and establishes a hierarchical relationship between classes.
Base Class
Key Concepts of Inheritance.
The class being inherited from.
Derived Class
Key Concepts of Inheritance.
The Class that inherits from the base class
Method Overriding
Key Concepts of Inheritance.
The ability of a subclass to provide a specific implementation of a method that is already defined in its superclass.
Single Inheritance

Multilevel Inheritance

Polymorphism
The primary principles of OOP.
It is the principle that allows objects of different classes to be treated as objects of a common superclass. It enables a single method to perform different functions based on the object that is invoking it.
Methods Overloading
Key Concepts of Polymorphism.
Defining multiple methods with the same name but different parameters in the same class.
Method Overriding
Key Concepts of Polymorphism.
Providing a specific implementation of a method in a subclass that overrides the implementation in the superclass.
Dynamic Dispatch
Key Concepts of Polymorphism.
The process of selecting which method implementation to call at runtime.
Abstraction
The primary principles of OOP.
It is the principle of hiding complex implementation details and showing only the essential features of an object. It allows programmers to work at a higher level of complexity without needing to understand the internal workings.
Procedural Programming
A programming paradigm that is based on the concept of procedure calls, also known as functions, routines, or subroutines.