## **Principles of Object-Oriented Programming**
### **1.1 History of the Software Crisis**
* During the **1960s–1980s**, software development faced a major challenge known as the
**Software Crisis**.
* **Problems included:**
* Projects often ran over time and budget.
* Software was unreliable and hard to maintain.
* Codebases became increasingly complex and unmanageable.
* Lack of standard development practices and proper documentation.
* The crisis revealed a need for better **software development methodologies**.
* This led to the emergence of **structured programming**, **modular programming**, and later
**object-oriented programming** to better handle complexity and maintainability.
### **1.2 Software Evolution**
* **Software evolution** is the process through which software systems are modified and enhanced
over time to meet changing user needs and technology.
* Early programs were simple and written in machine language.
* As systems grew, the following paradigms emerged:
1. **Assembly Language**
2. **Procedural Programming**
3. **Structured Programming**
4. **Object-Oriented Programming**
* **Lehman’s Laws** emphasized that software must evolve or it becomes less effective.
* Continuous changes can lead to increased complexity, so modern approaches like OOP help manage
that complexity.
### **1.3 Procedure-Oriented Programming (POP)**
* **POP** focuses on **functions or procedures** to perform operations.
* The main program is divided into a set of functions.
* **Key Features:**
* Emphasis is on **algorithm** or step-by-step instructions.
* **Data is global** and shared among functions.
* Follows a **top-down approach**.
* **Disadvantages:**
* Hard to manage in large systems.
* Data is not well-protected (no encapsulation).
* Difficult to reuse code.
### **1.4 Object-Oriented Paradigm**
* The **Object-Oriented Paradigm** models software based on real-world entities called **objects**.
* Combines **data** and **functions** that operate on the data into a single unit: the **object**.
* Encourages **modular**, **reusable**, and **extensible** code.
* **Benefits:**
* Easier to maintain and update.
* Encourages code reuse.
* Enhances security and scalability.
* This paradigm underpins modern programming languages like **Java, C++, Python**, and **C#**.
### **1.5 Basic Concepts of Object-Oriented Programming**
| Concept | Description |
| ----------------- | ---------------------------------------------------------------------------------------------------------------- |
| **Class** | A blueprint or template for creating objects. It defines data (attributes) and functions
(methods). |
| **Object** | An instance of a class. Represents a real-world entity with state and behavior.
|
| **Encapsulation** | Hides internal state and allows access through public methods. Protects data
from unauthorized access. |
| **Abstraction** | Shows only essential features and hides complex details. Simplifies interaction with
objects. |
| **Inheritance** | Enables a class to inherit properties and behavior from another class. Promotes
code reuse. |
| **Polymorphism** | Allows one interface to be used for different underlying data types. Supports
method overloading and overriding. |
These notes are suitable for academic reference, exam preparation, or use in presentations.
Would you like this content formatted into a downloadable PDF or presentation?