EVOLUTION OF OOP
•Early computing used unstructured code.
• Then came structured programming (like C).
• Limitations arose in handling complexity, data
security, and modularity.
• This led to the evolution of Object-Oriented
Programming (OOP).
2.
PROCEDURE ORIENTED
PROGRAMMING
• Focuseson functions or procedures.
• Data is secondary.
• Example languages: C, Pascal.
• Functions share global data.
• Modularity through function blocks.
• Hard to manage for large systems.
3.
POP - STRUCTURE
•Main() calls other functions.
• Functions are written to perform specific
tasks.
• Data passed among functions.
• No security of data.
• Difficult to scale.
4.
LIMITATIONS OF PROCEDURE
ORIENTEDPROGRAMMING
• - Data insecurity
• - Code duplication
• - Poor real-world modeling
• - Difficult to maintain large codebases
• - Hard to reuse code
5.
WHY OOP?
• Solveslimitations of POP.
• Models real-world objects.
• Supports code reusability.
• Enhances data security.
• Easier maintenance and scalability.
6.
OOP PARADIGM
• Object-OrientedParadigm treats data and
functions as a single unit - OBJECT.
• Focus on classes and objects.
• Popular in software development for large
systems.
7.
FEATURES OF OOP
•- Encapsulation
• - Abstraction
• - Inheritance
• - Polymorphism
• These provide security, flexibility, and reuse.
8.
OBJECTS AND CLASSES
•Object: Instance of a class
• Class: Blueprint for object creation
• Objects have attributes and behaviors
• Multiple objects can be created from one class
9.
ENCAPSULATION
• Wrapping dataand methods into a single unit
(class)
• Access control using private, public, protected
• Protects object integrity
10.
ABSTRACTION
• Hides internaldetails
• Shows only necessary features
• Implemented using abstract classes and
interfaces
• Helps in reducing complexity
11.
INHERITANCE
• Allows oneclass to inherit properties of
another
• Supports code reuse
• Types: single, multiple, hierarchical, multilevel
12.
POLYMORPHISM
• One interface,many forms
• Function Overloading: Same function name
with different parameters
• Function Overriding: Redefining parent
function in child class