Object-Oriented Programming (OOP)
Core Concepts:
1. Encapsulation: Bundling data with methods that operate on it.
2. Abstraction: Hiding complex implementation details.
3. Inheritance: Deriving new classes from existing ones.
4. Polymorphism: Allowing the same interface for different data types.
Example (Python):
class Animal:
def speak(self):
return "Sound"
class Dog(Animal):
def speak(self):
return "Bark"
Benefits:
OOP enhances modularity, code reuse, and maintainability — key for large projects.
Used In:
Software design, GUI frameworks, simulations, and game engines.