0% found this document useful (0 votes)
12 views3 pages

OOP_Unit1_Notes

The document introduces Object-Oriented Programming (OOP) and contrasts it with Procedural Programming, highlighting key differences such as data handling and code reusability. It outlines the four core principles of OOP: Encapsulation, Abstraction, Inheritance, and Polymorphism, and discusses the benefits and applications of OOP in software development. Overall, OOP is presented as a powerful paradigm that enhances modularity and efficiency in programming.

Uploaded by

hasamshaikh088
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views3 pages

OOP_Unit1_Notes

The document introduces Object-Oriented Programming (OOP) and contrasts it with Procedural Programming, highlighting key differences such as data handling and code reusability. It outlines the four core principles of OOP: Encapsulation, Abstraction, Inheritance, and Polymorphism, and discusses the benefits and applications of OOP in software development. Overall, OOP is presented as a powerful paradigm that enhances modularity and efficiency in programming.

Uploaded by

hasamshaikh088
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Unit 1: Introduction to Object-Oriented Programming (OOP)

1.1 Procedural vs. Object-Oriented Programming

Procedural Programming:

- Based on functions and procedures.

- Follows a top-down approach.

- Data is separate from functions.

- Example languages: C, Pascal, Fortran.

Object-Oriented Programming (OOP):

- Based on objects and classes.

- Follows a bottom-up approach.

- Data is encapsulated and protected.

- Example languages: C++, Java, Python.

Comparison Table:

| Feature | Procedural Programming | Object-Oriented Programming |

|----------------------|----------------------|-----------------------------|

| Approach | Top-down | Bottom-up |

| Data Handling | Separate from functions | Encapsulated in objects |

| Code Reusability | Less | High (due to inheritance) |

| Security | Low (Global access) | High (Encapsulation) |

| Examples | C, Pascal | C++, Java, Python |

1.2 Principles of Object-Oriented Programming (OOP)


1. Encapsulation:

- Wrapping of data and functions into a single unit (class).

- Restricts direct access to data.

2. Abstraction:

- Hides implementation details and shows only necessary functionality.

3. Inheritance:

- One class derives properties and behaviors from another.

- Reduces redundancy and improves reusability.

4. Polymorphism:

- Allows functions or operators to behave differently based on context.

- Example: Function Overloading and Overriding.

1.3 Benefits and Applications of OOP

Benefits:

- Code reusability, Data security, Flexibility, Easy maintenance.

Applications:

- Software Development, Databases, Operating Systems, AI & ML.

Conclusion:

- OOP is a powerful paradigm for modern software development.

- Four core principles (Encapsulation, Abstraction, Inheritance, Polymorphism) enhance modularity


and efficiency.

You might also like