0% found this document useful (0 votes)
15 views4 pages

Lecture Notes - Object Oriented Programming

Object Oriented Programming (OOP) is a programming paradigm that organizes software design around objects, improving reusability, maintainability, scalability, and reliability. It has evolved from procedural programming to structured programming and finally to OOP, which includes paradigms like encapsulation, abstraction, inheritance, and polymorphism. While OOP offers advantages such as better data security and real-world modeling, it also has drawbacks like higher memory consumption and a steep learning curve.

Uploaded by

gabriel njuguna
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)
15 views4 pages

Lecture Notes - Object Oriented Programming

Object Oriented Programming (OOP) is a programming paradigm that organizes software design around objects, improving reusability, maintainability, scalability, and reliability. It has evolved from procedural programming to structured programming and finally to OOP, which includes paradigms like encapsulation, abstraction, inheritance, and polymorphism. While OOP offers advantages such as better data security and real-world modeling, it also has drawbacks like higher memory consumption and a steep learning curve.

Uploaded by

gabriel njuguna
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

Object Oriented Programming (OOP) – Lecture

Notes
1. Introduction to Object Oriented Programming
Object Oriented Programming (OOP) is a programming paradigm that organizes software design around
objects, rather than functions or logic. Objects represent real-world entities and contain data (attributes)
and behavior (methods) bundled together.

The main goal of OOP is to improve software reusability, maintainability, scalability, and reliability.

2. Evolution of Object Oriented Programming

2.1 Procedural Programming Era

• Examples: FORTRAN, COBOL, C


• Focused on procedures/functions
• Data and functions were separate
• Problems:
• Difficult to maintain large programs
• Poor data security
• Code reuse was limited

2.2 Structured Programming

• Improved procedural programming


• Introduced control structures (if, loops)
• Still lacked data abstraction

2.3 Object Oriented Programming Era

• Introduced in the 1960s with Simula


• Popularized by Smalltalk in the 1970s
• Gained wide adoption with C++ (1980s) and Java (1990s)

Key motivation: - Model software closer to real-world entities - Manage complexity in large systems

3. Object Oriented Programming Paradigms

3.1 Encapsulation

• Bundling data and methods into a single unit (class)

1
• Data is hidden using access modifiers

Advantages: - Improves data security - Reduces system complexity

3.2 Abstraction

• Showing only essential details and hiding implementation


• Achieved using abstract classes and interfaces

Advantages: - Reduces programming complexity - Improves maintainability

3.3 Inheritance

• Ability of a class to acquire properties of another class

Advantages: - Code reuse - Easier maintenance

3.4 Polymorphism

• Ability of an object to take many forms


• Method overloading and overriding

Advantages: - Flexibility - Easier extension of programs

4. Merits and Demerits of Object Oriented Programming

4.1 Merits of OOP

• Code reusability
• Better data security
• Easy maintenance and debugging
• Real-world modeling
• Scalability for large systems

4.2 Demerits of OOP

• Higher memory consumption


• Slower execution compared to procedural languages
• Steep learning curve
• Not suitable for small/simple applications

5. Examples of Object Oriented Languages

Language Description

Java Platform-independent, widely used in enterprise systems

2
Language Description

C++ Supports both procedural and OOP paradigms

Python Simple syntax, supports OOP concepts

C# Used mainly in Microsoft environments

Ruby Pure object-oriented language

Smalltalk Fully object-oriented

6. Operating System Requirements for OOP


Operating systems that support OOP-based applications should provide:

• Memory Management: Efficient handling of objects in memory


• Process Management: Support multitasking and object-based processes
• Security & Access Control: Enforce data encapsulation and protection
• File System Support: Persistent storage of objects
• Concurrency Support: Threads and synchronization

Examples of OS supporting OOP applications: - Windows - Linux - macOS

7. Object Oriented Databases (OODB)

7.1 Definition

An Object Oriented Database (OODB) stores data as objects, similar to those used in OOP languages. It
integrates database capabilities with object-oriented programming concepts.

7.2 Features of OODB

• Object identity
• Encapsulation of data and methods
• Support for inheritance
• Complex data types
• Persistent objects

7.3 Advantages of OODB

• Eliminates object-relational mismatch


• Better support for complex data (multimedia, CAD, GIS)
• Improved performance for object-based applications
• Seamless integration with OOP languages

3
7.4 Disadvantages of OODB

• Lack of standard query language


• Limited vendor support
• Complexity in design
• Less popular compared to relational databases

8. Summary
Object Oriented Programming has evolved to address the limitations of procedural programming. Its
paradigms—encapsulation, abstraction, inheritance, and polymorphism—make it ideal for building
complex and large-scale software systems. Despite some disadvantages, OOP remains the dominant
paradigm in modern software development.

You might also like