OOP
(Object Oriented Programming)
A Presentation By:
Rasim Izhar Ali
BECS/S13/0109
What is OOP?
Object Oriented Programming (OOP) is a
programming technique in which programs
are written on the basis of objects.
Examples:
 C++
 PHP
 Java
 Objective-C
Classes And Objects
Classes(Classification Of Objects)
A class is a group of objects with same attributes
and behavior. The characteristics of a class are
:
 A name
 Attributes
 Behaviour
What is Object?
• An object represents an entity in the real
world such as a person , thing or concept etc.
• An object is identified by its name. All object
have these characteristics :
 Identity
 State
 Behaviour
 Reusability
Extensibility
 Decomposability
 Compos ability
 Understandability
 Security
Benefits Of OOP
Characteristics Of OOP
Characteristics Of OOP
 Inheritance
 Data Abstraction
 Data Encapsulation
 Polymorphism
Inheritance
Inheritance
A programming technique that is used to
reuse an existing class to build a new classis
known as inheritance.
Categories Of Inheritance
1) Single Inheritance:
In Single Inheritance, the child class inherits
all data members and member functions of
the base class.
2) Multiple Inheritance:
In Multiple Inheritance, the child class
inherits all data members and member
function of base class.
Types Of Inheritance
1) Public Inheritance:
In public inheritance, the access status of parent
class members in the derived class remains the
same.
• The public members of parent class become public
members of derived class.
• The private members of parent class become
private members of derived class.
• The protected members of parent class become
protected members of derived class.
2) Protected Inheritance:
In protected inheritance, the access status of
parent class members in derived class is restricted.
• The public members of parent class become
protected members of derived class.
• The protected members of parent class become
protected members of derived class.
• The private members of parent class become
private members of derived class.
3) Private Inheritance:
In private inheritance, the access status of parent
class members in the derived class is restricted.
• The private members of parent class become the
private members of derived class.
• The public members of parent class become the
private members of derived class.
• The protected members of parent class become the
private members of derived class.
Data Abstraction
Data Abstraction
Data abstraction or information hiding refers
to providing only essential information to the
outside world and hiding their background
details.
Advantages Of Data Abstraction
 Simplification of software development.
 Testing and debugging.
 Reusability.
 Security.
 Modifications to the representation of a data
type.
Data Encapsulation
Data Encapsulation
Data Encapsulation is an Object Oriented
Programming concept that binds together the data
and functions that manipulate the data and that
keep both safe from outside interference and
misuse.
Polymorphism
What is Polymorphism?
The word polymorphism is a combination of two
words poly and morphism. Poly means many and
morphism means form.
In object-oriented programming, polymorphism is
the ability of objects of different types to respond to
functions of the same name. The user does not have
to know the exact type of the object in advance. The
behavior of the object can be implemented at run
time.
Types Of Polymorphism
 Virtual functions.
 Operator overloading.
 Function overloading.
Thank you

Characteristics of oop

  • 1.
    OOP (Object Oriented Programming) APresentation By: Rasim Izhar Ali BECS/S13/0109
  • 2.
    What is OOP? ObjectOriented Programming (OOP) is a programming technique in which programs are written on the basis of objects. Examples:  C++  PHP  Java  Objective-C
  • 3.
  • 4.
    Classes(Classification Of Objects) Aclass is a group of objects with same attributes and behavior. The characteristics of a class are :  A name  Attributes  Behaviour
  • 5.
    What is Object? •An object represents an entity in the real world such as a person , thing or concept etc. • An object is identified by its name. All object have these characteristics :  Identity  State  Behaviour
  • 6.
     Reusability Extensibility  Decomposability Compos ability  Understandability  Security Benefits Of OOP
  • 7.
  • 8.
    Characteristics Of OOP Inheritance  Data Abstraction  Data Encapsulation  Polymorphism
  • 9.
  • 10.
    Inheritance A programming techniquethat is used to reuse an existing class to build a new classis known as inheritance.
  • 11.
    Categories Of Inheritance 1)Single Inheritance: In Single Inheritance, the child class inherits all data members and member functions of the base class. 2) Multiple Inheritance: In Multiple Inheritance, the child class inherits all data members and member function of base class.
  • 12.
    Types Of Inheritance 1)Public Inheritance: In public inheritance, the access status of parent class members in the derived class remains the same. • The public members of parent class become public members of derived class. • The private members of parent class become private members of derived class. • The protected members of parent class become protected members of derived class.
  • 13.
    2) Protected Inheritance: Inprotected inheritance, the access status of parent class members in derived class is restricted. • The public members of parent class become protected members of derived class. • The protected members of parent class become protected members of derived class. • The private members of parent class become private members of derived class.
  • 14.
    3) Private Inheritance: Inprivate inheritance, the access status of parent class members in the derived class is restricted. • The private members of parent class become the private members of derived class. • The public members of parent class become the private members of derived class. • The protected members of parent class become the private members of derived class.
  • 15.
  • 16.
    Data Abstraction Data abstractionor information hiding refers to providing only essential information to the outside world and hiding their background details.
  • 17.
    Advantages Of DataAbstraction  Simplification of software development.  Testing and debugging.  Reusability.  Security.  Modifications to the representation of a data type.
  • 18.
  • 19.
    Data Encapsulation Data Encapsulationis an Object Oriented Programming concept that binds together the data and functions that manipulate the data and that keep both safe from outside interference and misuse.
  • 20.
  • 21.
    What is Polymorphism? Theword polymorphism is a combination of two words poly and morphism. Poly means many and morphism means form. In object-oriented programming, polymorphism is the ability of objects of different types to respond to functions of the same name. The user does not have to know the exact type of the object in advance. The behavior of the object can be implemented at run time.
  • 22.
    Types Of Polymorphism Virtual functions.  Operator overloading.  Function overloading.
  • 23.