0% found this document useful (0 votes)
2 views

Introduction to Object-Oriented Programming (OOP) ^0 Its Core Pillars

Object-Oriented Programming (OOP) is a programming paradigm centered around objects that encapsulate data and methods, structured through classes. The four core principles of OOP are encapsulation, abstraction, inheritance, and polymorphism, each providing distinct benefits such as code reusability, modularity, and flexibility. OOP enhances maintainability by allowing changes to individual classes without impacting the entire system.

Uploaded by

abdulhanna627
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

Introduction to Object-Oriented Programming (OOP) ^0 Its Core Pillars

Object-Oriented Programming (OOP) is a programming paradigm centered around objects that encapsulate data and methods, structured through classes. The four core principles of OOP are encapsulation, abstraction, inheritance, and polymorphism, each providing distinct benefits such as code reusability, modularity, and flexibility. OOP enhances maintainability by allowing changes to individual classes without impacting the entire system.

Uploaded by

abdulhanna627
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 9

Title :

Introduction to Object-Oriented
Programming (OOP) & Its Core Pillars

G r o u p Members:

1. M . Abdul Moiz
2. Faraz Khaliq
3. Subhan Qureshi
4. Atkah Zubair
5. Kisa e Zahra
What is Object-Oriented Programming?
Object-Oriented Programming (OOP) is a programming technique where software
is structured around objects, which contain both data and methods (functions). The concept
is based on classes that define the structure and behavior of objects.
Key Concepts:

o Classes: Blueprints for objects, defining properties and behaviors.

o Objects: Real-world entities created from classes.

o Attributes: Properties that define the state of an object.

o Methods: Functions that define the behavior of an object.


Benefits of OOP
o Code Reusability: Once a class is defined,
it can be reused across different parts of
the program or in different projects.
o Modularity: Code is organized into distinct
objects, making it easier to manage and
maintain.
o Flexibility: OOP’s inheritance and
polymorphism make systems adaptable to
new requirements.
o Maintainability: Changes can be made to
individual classes without affecting the
entire system
The Four Pillars of OOP

OOP is based on four main principles:

1.Encapsulation
2.Abstraction
3.Inheritance
4.Polymorphism
Encapsulation

Encapsulation is the concept of bundling


data (attributes) and methods (functions)
that manipulate the data inside a class,
restricting direct access to some of an
object's components.

Benefits:

Data is hidden from the outside world.


Access to the data is controlled through
getter and setter methods.
Abstraction
Abstraction is the concept of hiding the complex execution details and showing only
the necessary features or functionality to the user.

Benefits:
o Simplifies interaction with complex systems.
o Prevents users from getting overwhelmed by implementation details.
Inheritance
Inheritance is a mechanism where a new
class can acquire attributes and methods from
an existing class, allowing for code reuse and
extension.
Benefits:
o Promotes code reuse.
o Enables a hierarchical relationship
between classes.
Polymorphism
Polymorphism allows objects of different classes to be treated as instances of a common
superclass. It enables a single interface to represent different underlying forms or behaviors.
Benefits:
o Increases flexibility and reusability.
o Enables different objects to respond to the same method in different ways.

You might also like