2. Introduction
Object-Oriented programming is a programming
methodology that associates data structures with a set
of operators which act upon it
The errors faced in the procedure oriented
programming approach are the motivating factor in
the invention of objected oriented approach
3. Procedure Oriented Programming Object Oriented Programming
Emphasis is given on procedures. Emphasis is given on data
Programs are divided into functions. Programs are divided into objects.
Generally data cannot be hidden Data can be hidden, so that non-
member function cannot access them.
It does not model the real world
problem perfectly
It models the real world problem very
well.
Examples: FORTRAN,COBOL, Pascal, C Example: C++, JAVA, Smalltalk
5. Abstraction
Abstraction means the representation of the essential
features without providing the internal details and
complexities.
In OOP, abstraction is achieved by the help of class,
where data and methods are combined to extract the
essential features only
6. Encapsulation
The process of combining the data (called fields or
attributes) and functions (called methods or
behaviors) into a single framework called class.
Encapsulation helps preventing the modification of
data from outside the class by properly assigning the
access privilege to the data inside the class.
7. Inheritence
Inheritance is the process of acquiring certain
attributes and behaviors from parents.
For examples, cars, trucks, buses, and motorcycles
inherit all characteristics of vehicles.
Object-oriented programming allows classes to inherit
commonly used data and functions from other classes