TL;DR
Object-Oriented Programming is a programming paradigm that uses the concept of "objects," which can encapsulate data and behavior. In OOP, there are several key terms and concepts.
Here are some of the fundamental terms:
-
Class - a blueprint or template for creating objects. It defines the properties (attributes) and behaviors (methods) that the objects of the class will have.
-
Object - an instance of a class. Objects are created based on the structure defined by the class and represent a real-world entity with its own state and behavior.
-
Encapsulation - the bundling of data and the methods that operate on that data into a single unit (class). It helps in hiding the internal details of an object and exposing only what is necessary.
-
Inheritance - mechanism that allows a new class (subclass or derived class) to inherit properties and behaviors of an existing class (superclass or base class). It promotes code reusability.
-
Polymorphism - the ability of objects of different classes to respond to the same message (method call) in a way that is specific to their class. It can take the form of method overloading or method overriding.
-
Abstraction - the process of simplifying complex systems by modeling classes based on the essential properties and behaviors. It involves hiding the unnecessary details while exposing the essential features.
-
Method - a function defined within a class. It represents the behavior of the objects created from that class.
-
Properties - data member of a class. It represents the characteristics or properties of an object.
-
Constructor - a special method that is called when an object is created. It is used to initialize the object's state.
-
Destructor - a special method that is called when an object is destroyed or goes out of scope. It is used to perform cleanup operations.
-
Interface - a collection of abstract methods that defines a contract for classes that implement it. It helps achieve abstraction and multiple inheritance in programming languages that support it.
-
Encapsulation - the bundling of data and methods that operate on the data into a single unit. It helps in hiding the internal details of an object and exposing only what is necessary.