INTRODUCTION TO OBJECT-
ORIENTED PROGRAMMING(OOP)
AND PRINCIPLES
1
ASSIGNED BY : SIR ALI RAZA ARAIEN
PRESENTED BY:
KHAN MUHAMMAD LASHARI (24-BS IT-15)
ADNAN ALI (24-BS IT-04)
IZHAR ALI RAJPOT (24-BS IT-05)
2
 Object Oriented programming is a computer
programming model that organized software
design around data or objects
 The main purpose of OOP to enhances code
reusability, maintainability, and modularity, making
it easier to manage complex systems
What is OOP ?
3
Class:
The class is a user define or blueprint or template
for creating objects.
4
Object:
An object is an instance of class that encapsulate
data (Attributes) and methods.
5
Features Of OOP
6
• Object-Oriented Programming evolved as a
response to the limitations of earlier procedural
programming paradigms
 Simula (1967):
The first language to introduce the concept of
classes, objects and inheritance was Simula. Developed
by Ole-Johan Dahl and Kristen Nygaard at the Norwegian
Computing Center. Simula was initially designed for
simulations but later became the foundation for OOP
History Of OOP
7
 Smalltalk (1972):
Smalltalk is one of the most influential early object-
oriented programming languages Developed by Alan Kay,
Dan Ingalls in 1972 at Xerox PARC. Smalltalk is advanced
OOP it introduced the concept of Encapsulation and
Polymorphism
Alan Kay coined the term "Object-Oriented
Programming" and is often credited with being the
"father" of OOP
History Of OOP
8
Principals of OOP
9
Encapsulation
 Encapsulation is a mechanism through which
we can wrapping the data member and member
method of class in a single united is called
encapsulation
 Control over program`s attributes and methods
Example: Class is the best example of
encapsulation
10
11
 An abstraction is a process of hiding the
implementation details from the user only the
highlighting set of service provided to user
Coding
is
hide 2+2=4
User
Abstraction
Add
Subtract
Multiply
Divide
12
 Security
 Enhancement
13
 Inheritance is a process to inherit attributes and
methods from one class to another
 Derived class (Subclass/child) - the class that
inherits properties from another class
 Base class (Superclass/parent) - the class being
inherited properties from
 To inherit from a class, use the symbol is ( : )
Inheritance
14
15
Inheritance
 Single Inheritance
 Multiple Inheritance
 Multi level Inheritance
 Hybrid Inheritance
 Hierarchical Inheritance
16
 Polymorphism is derived from two words
• Poly means : Many
• Morph means : forms
• Polymorphism = manyforms
 When a member function or an object behaves
in different manner under different
circumstances, then it can be defined as
polymorphism
 To perform a single action in different ways
Polymorphism
17
18
Type of polymorphism
19
Thank You!
For Your Attention
INTRODUCTION TO OBJECT-ORIENTED PROGRAMMING(OOP) AND PRINCIPLES.pptx

INTRODUCTION TO OBJECT-ORIENTED PROGRAMMING(OOP) AND PRINCIPLES.pptx

  • 2.
    INTRODUCTION TO OBJECT- ORIENTEDPROGRAMMING(OOP) AND PRINCIPLES 1
  • 3.
    ASSIGNED BY :SIR ALI RAZA ARAIEN PRESENTED BY: KHAN MUHAMMAD LASHARI (24-BS IT-15) ADNAN ALI (24-BS IT-04) IZHAR ALI RAJPOT (24-BS IT-05) 2
  • 4.
     Object Orientedprogramming is a computer programming model that organized software design around data or objects  The main purpose of OOP to enhances code reusability, maintainability, and modularity, making it easier to manage complex systems What is OOP ? 3
  • 5.
    Class: The class isa user define or blueprint or template for creating objects. 4
  • 6.
    Object: An object isan instance of class that encapsulate data (Attributes) and methods. 5
  • 7.
  • 8.
    • Object-Oriented Programmingevolved as a response to the limitations of earlier procedural programming paradigms  Simula (1967): The first language to introduce the concept of classes, objects and inheritance was Simula. Developed by Ole-Johan Dahl and Kristen Nygaard at the Norwegian Computing Center. Simula was initially designed for simulations but later became the foundation for OOP History Of OOP 7
  • 9.
     Smalltalk (1972): Smalltalkis one of the most influential early object- oriented programming languages Developed by Alan Kay, Dan Ingalls in 1972 at Xerox PARC. Smalltalk is advanced OOP it introduced the concept of Encapsulation and Polymorphism Alan Kay coined the term "Object-Oriented Programming" and is often credited with being the "father" of OOP History Of OOP 8
  • 10.
  • 11.
    Encapsulation  Encapsulation isa mechanism through which we can wrapping the data member and member method of class in a single united is called encapsulation  Control over program`s attributes and methods Example: Class is the best example of encapsulation 10
  • 12.
  • 13.
     An abstractionis a process of hiding the implementation details from the user only the highlighting set of service provided to user Coding is hide 2+2=4 User Abstraction Add Subtract Multiply Divide 12
  • 14.
  • 15.
     Inheritance isa process to inherit attributes and methods from one class to another  Derived class (Subclass/child) - the class that inherits properties from another class  Base class (Superclass/parent) - the class being inherited properties from  To inherit from a class, use the symbol is ( : ) Inheritance 14
  • 16.
  • 17.
    Inheritance  Single Inheritance Multiple Inheritance  Multi level Inheritance  Hybrid Inheritance  Hierarchical Inheritance 16
  • 18.
     Polymorphism isderived from two words • Poly means : Many • Morph means : forms • Polymorphism = manyforms  When a member function or an object behaves in different manner under different circumstances, then it can be defined as polymorphism  To perform a single action in different ways Polymorphism 17
  • 19.
  • 20.
  • 21.