-
Notifications
You must be signed in to change notification settings - Fork 100
Object‐Oriented Programming (OOP) – Overview
Dr. M H B Ariyaratne edited this page Mar 7, 2025
·
1 revision
Title:
Object-Oriented Programming (OOP) – Overview
Contents:
-
Introduction
Definition and purpose of OOP.
Benefits: Reusability, scalability, and easier maintenance. -
Core Concepts
- Class: Blueprint for creating objects.
- Object: Instance of a class.
- Encapsulation: Hiding internal details and exposing only necessary parts.
- Inheritance: Reusing code by creating subclasses from a superclass.
- Polymorphism: Same method behaves differently based on context.
- Abstraction: Hiding complexity and showing only essential features.
-
Principles
- DRY (Don’t Repeat Yourself).
- SOLID principles for clean, scalable design.
-
Advantages of OOP
- Modular code.
- Easy debugging and testing.
- Improves collaboration in large projects.
-
Common OOP Languages
Java, C++, Python, C#, PHP. -
Simple Example
A basic class with properties and methods (e.g.,Patient
with name, age, and methods to update details). -
Use Cases
- Enterprise applications.
- Web and mobile applications.
- Game development.
-
Conclusion
OOP is a fundamental programming approach for building organised, reusable, and scalable software.
Let me know if you want the actual wiki text or code examples included.