OBJECT ORIENTED
OBJECT ORIENTED
PROGRAMMING
PROGRAMMING
INTRODUCTION
INTRODUCTION
 It is a new way of organizing and developing programs and has
It is a new way of organizing and developing programs and has
nothing to do with any particular language
nothing to do with any particular language
 Object oriented programming allows us to decompose a problem
Object oriented programming allows us to decompose a problem
into a number of entities called objects and then build data and
into a number of entities called objects and then build data and
functions
functions
 It creates partitioned memory area for both data and
It creates partitioned memory area for both data and
functions that can be used as templates for creating
functions that can be used as templates for creating
copies of such modules on demand.
copies of such modules on demand.
 Languages that support OOP features include C++, Object Pascal,
Languages that support OOP features include C++, Object Pascal,
Ada, Java
Ada, Java
Classes And Objects
Classes And Objects
 Classes are the basic building unit in the object oriented
Classes are the basic building unit in the object oriented
programming concept that is all the required functions of a
programming concept that is all the required functions of a
particular class type are defined in the class, which can be
particular class type are defined in the class, which can be
accessed later according to the programmers need.
accessed later according to the programmers need.
 A object is instance of class that contains all the properties of
A object is instance of class that contains all the properties of
class.
class.
 To access a particular member function/method of a particular
To access a particular member function/method of a particular
class, dot operator is used.
class, dot operator is used.
 A class may be thought as a data type and an object as a
A class may be thought as a data type and an object as a
variable of that data type.
variable of that data type.
 Once a class is defined, we can create any number of
Once a class is defined, we can create any number of
objects belonging to same class.
objects belonging to same class.
ABSTRACTION &
ABSTRACTION &
ENCAPSULATION
ENCAPSULATION

The concept of abstraction and encapsulation relates to the idea of
The concept of abstraction and encapsulation relates to the idea of
hiding data that are not needed for the presentation
hiding data that are not needed for the presentation

This provides some of the declarations which decides the
This provides some of the declarations which decides the
availability of data members of a class by other classes
availability of data members of a class by other classes

In OOP, information hiding reduces software development risk by
In OOP, information hiding reduces software development risk by
shifting the code's dependency on an uncertain implementation
shifting the code's dependency on an uncertain implementation
onto a well-defined interface
onto a well-defined interface

An example of this concept can be seen in the case of bank
An example of this concept can be seen in the case of bank
accounts , orkut etc
accounts , orkut etc
POLYMORPHISM
POLYMORPHISM
 Polymorphism means the ability to take more than one form
Polymorphism means the ability to take more than one form
 It provides a special facility that is same function can be called
It provides a special facility that is same function can be called
for different purpose depending on the number and type of
for different purpose depending on the number and type of
argument
argument
 It is type of a function overloading
It is type of a function overloading
 It can be said under a common name required number of
It can be said under a common name required number of
operations can be performed depending on parameters passed
operations can be performed depending on parameters passed
 Ex-Two differ shapes will be drawn under a common function but
Ex-Two differ shapes will be drawn under a common function but
different parameters
different parameters
Rectangle
Rectangle Circle
Circle
draw(x,y);
draw(x,y); draw(x);
draw(x);
INHERITANCE
INHERITANCE
 Inheritance is the concept of a child class automatically inheriting the
Inheritance is the concept of a child class automatically inheriting the
variables and methods defined in its parent class
variables and methods defined in its parent class
 A child class is also called sub class (which inherits)
A child class is also called sub class (which inherits)
 A parent class is also called super class (which is inherited)
A parent class is also called super class (which is inherited)
 It makes all the functions and variables of parent class available to sub
It makes all the functions and variables of parent class available to sub
class i.e all the functions of parent class can be called directly by sub class
class i.e all the functions of parent class can be called directly by sub class
 Types of inheritance are:
Types of inheritance are:
Single class inheritance
Single class inheritance Multilevel inheritance
Multilevel inheritance
Multiple Inheritance
Multiple Inheritance Hierarchical Inheritance
Hierarchical Inheritance
Hybrid Inheritance
Hybrid Inheritance
Application of OOP
Application of OOP

Real-time systems
Real-time systems

Stimulation and modeling
Stimulation and modeling

Object-oriented databases
Object-oriented databases

Hypertext, hypermedia and expertext
Hypertext, hypermedia and expertext

AI and expert systems
AI and expert systems

Neutral networks and parallel programming
Neutral networks and parallel programming

Decision support and office automation systems
Decision support and office automation systems

CIM/CAD/CAD system
CIM/CAD/CAD system
Conclusion
Conclusion
This report on Object oriented programming has let me
This report on Object oriented programming has let me
conclude that Object oriented is one of the most important
conclude that Object oriented is one of the most important
concept in the programming which helps the programmer to
concept in the programming which helps the programmer to
program more effectively and efficiently. The main feature is
program more effectively and efficiently. The main feature is
the flexibility of classes and objects which saves programmer’s
the flexibility of classes and objects which saves programmer’s
time. It provides some of the features like data abstraction,
time. It provides some of the features like data abstraction,
encapsulation, polymorphism, inheritance which has made it
encapsulation, polymorphism, inheritance which has made it
possible for the object oriented programming concept to be
possible for the object oriented programming concept to be
used in the real world situations.
used in the real world situations.
So to be an effective programmer one must go through the
So to be an effective programmer one must go through the
concept of Object oriented programming thoroughly.
concept of Object oriented programming thoroughly.

Object-Oriented-Programming in python basic

  • 1.
  • 2.
    INTRODUCTION INTRODUCTION  It isa new way of organizing and developing programs and has It is a new way of organizing and developing programs and has nothing to do with any particular language nothing to do with any particular language  Object oriented programming allows us to decompose a problem Object oriented programming allows us to decompose a problem into a number of entities called objects and then build data and into a number of entities called objects and then build data and functions functions  It creates partitioned memory area for both data and It creates partitioned memory area for both data and functions that can be used as templates for creating functions that can be used as templates for creating copies of such modules on demand. copies of such modules on demand.  Languages that support OOP features include C++, Object Pascal, Languages that support OOP features include C++, Object Pascal, Ada, Java Ada, Java
  • 3.
    Classes And Objects ClassesAnd Objects  Classes are the basic building unit in the object oriented Classes are the basic building unit in the object oriented programming concept that is all the required functions of a programming concept that is all the required functions of a particular class type are defined in the class, which can be particular class type are defined in the class, which can be accessed later according to the programmers need. accessed later according to the programmers need.  A object is instance of class that contains all the properties of A object is instance of class that contains all the properties of class. class.  To access a particular member function/method of a particular To access a particular member function/method of a particular class, dot operator is used. class, dot operator is used.  A class may be thought as a data type and an object as a A class may be thought as a data type and an object as a variable of that data type. variable of that data type.  Once a class is defined, we can create any number of Once a class is defined, we can create any number of objects belonging to same class. objects belonging to same class.
  • 4.
    ABSTRACTION & ABSTRACTION & ENCAPSULATION ENCAPSULATION  Theconcept of abstraction and encapsulation relates to the idea of The concept of abstraction and encapsulation relates to the idea of hiding data that are not needed for the presentation hiding data that are not needed for the presentation  This provides some of the declarations which decides the This provides some of the declarations which decides the availability of data members of a class by other classes availability of data members of a class by other classes  In OOP, information hiding reduces software development risk by In OOP, information hiding reduces software development risk by shifting the code's dependency on an uncertain implementation shifting the code's dependency on an uncertain implementation onto a well-defined interface onto a well-defined interface  An example of this concept can be seen in the case of bank An example of this concept can be seen in the case of bank accounts , orkut etc accounts , orkut etc
  • 5.
    POLYMORPHISM POLYMORPHISM  Polymorphism meansthe ability to take more than one form Polymorphism means the ability to take more than one form  It provides a special facility that is same function can be called It provides a special facility that is same function can be called for different purpose depending on the number and type of for different purpose depending on the number and type of argument argument  It is type of a function overloading It is type of a function overloading  It can be said under a common name required number of It can be said under a common name required number of operations can be performed depending on parameters passed operations can be performed depending on parameters passed  Ex-Two differ shapes will be drawn under a common function but Ex-Two differ shapes will be drawn under a common function but different parameters different parameters Rectangle Rectangle Circle Circle draw(x,y); draw(x,y); draw(x); draw(x);
  • 6.
    INHERITANCE INHERITANCE  Inheritance isthe concept of a child class automatically inheriting the Inheritance is the concept of a child class automatically inheriting the variables and methods defined in its parent class variables and methods defined in its parent class  A child class is also called sub class (which inherits) A child class is also called sub class (which inherits)  A parent class is also called super class (which is inherited) A parent class is also called super class (which is inherited)  It makes all the functions and variables of parent class available to sub It makes all the functions and variables of parent class available to sub class i.e all the functions of parent class can be called directly by sub class class i.e all the functions of parent class can be called directly by sub class  Types of inheritance are: Types of inheritance are: Single class inheritance Single class inheritance Multilevel inheritance Multilevel inheritance Multiple Inheritance Multiple Inheritance Hierarchical Inheritance Hierarchical Inheritance Hybrid Inheritance Hybrid Inheritance
  • 7.
    Application of OOP Applicationof OOP  Real-time systems Real-time systems  Stimulation and modeling Stimulation and modeling  Object-oriented databases Object-oriented databases  Hypertext, hypermedia and expertext Hypertext, hypermedia and expertext  AI and expert systems AI and expert systems  Neutral networks and parallel programming Neutral networks and parallel programming  Decision support and office automation systems Decision support and office automation systems  CIM/CAD/CAD system CIM/CAD/CAD system
  • 8.
    Conclusion Conclusion This report onObject oriented programming has let me This report on Object oriented programming has let me conclude that Object oriented is one of the most important conclude that Object oriented is one of the most important concept in the programming which helps the programmer to concept in the programming which helps the programmer to program more effectively and efficiently. The main feature is program more effectively and efficiently. The main feature is the flexibility of classes and objects which saves programmer’s the flexibility of classes and objects which saves programmer’s time. It provides some of the features like data abstraction, time. It provides some of the features like data abstraction, encapsulation, polymorphism, inheritance which has made it encapsulation, polymorphism, inheritance which has made it possible for the object oriented programming concept to be possible for the object oriented programming concept to be used in the real world situations. used in the real world situations. So to be an effective programmer one must go through the So to be an effective programmer one must go through the concept of Object oriented programming thoroughly. concept of Object oriented programming thoroughly.