Skip to content

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:

  1. Introduction
    Definition and purpose of OOP.
    Benefits: Reusability, scalability, and easier maintenance.

  2. 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.
  3. Principles

    • DRY (Don’t Repeat Yourself).
    • SOLID principles for clean, scalable design.
  4. Advantages of OOP

    • Modular code.
    • Easy debugging and testing.
    • Improves collaboration in large projects.
  5. Common OOP Languages
    Java, C++, Python, C#, PHP.

  6. Simple Example
    A basic class with properties and methods (e.g., Patient with name, age, and methods to update details).

  7. Use Cases

    • Enterprise applications.
    • Web and mobile applications.
    • Game development.
  8. 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.

Clone this wiki locally