Professional Documents
Culture Documents
Sad
Sad
object like a car or a laptop. An object contains a state and some behaviour. The state of an
object is the properties of the object at a particular time, and behaviour is the functions it will
perform. The behaviour of an object is usually described using methods, and these methods will
be part of the object itself. So you don't have to refer anywhere else for object's functionality,
whereas in function based traditional approach you need to remember all the methods and
their location. For instance, in java, the state of an object is the set of values of an object's
variables at any particular time and the behaviour is implemented as methods.
2, Class Objects are grouped into a class. A class can be defined as a group of objects with the
same structure and behaviour. Class can be considered as the blueprint or definition or a
template for an object and describes the properties and behaviour of that object, but without
any actual existence. An object is a particular instance of a class which has actual existence and
there can be many objects (or instances) for a class. In the case of a car or laptop, there will be
a blueprint or design created first and then the actual car or laptop will be built based on that.
We do not actually buy these blueprints but the actual objects.
Languages used in Procedural Programming: FORTRAN, ALGOL, COBOL, BASIC, Pascal and C.
Object Oriented Programming: can be defined as a programming model which is based upon
the concept of objects. Objects contain data in the form of attributes and code in the form of
methods. In object oriented programming, computer programs are designed using the concept
of objects that interact with real world. Object oriented programming languages are various but
the most popular ones are class-based, meaning that objects are instances of classes, which
also determine their types.
Languages used in Object Oriented Programming: Java, C++, C#, Python, PHP, JavaScript, Ruby,
Perl, Objective-C, Dart, Swift, Scala.
Procedural Oriented Object Oriented
Programming Programming
In object oriented
In procedural programming, programming, program is
program is divided into divided into small parts
small parts called functions. called objects.
Object oriented
programming
Procedural programming follows bottom up
follows top down approach. approach.
Object oriented
programming have access
There is no access specifier specifiers like private,
in procedural programming. public, protected etc.
Overloading is possible in
In procedural programming, object oriented
overloading is not possible. programming.
Object oriented
Procedural programming is programming is based
based on unreal world. on real world.
Procedural
Oriented
Programming
Object Oriented
Programming
In procedural
programming,
program is
parts called
functions .
In object oriented
programming,
program is
parts called
objects .
Procedural
programming
Object oriented
programming
follows bottom
up approach .
There is no
access specifier
in procedural
programming.
Object oriented
programming
have access
specifiers like
private, public,
protected etc.
and function is
not easy.
and function is
easy.
Procedural
programming
it is less secure.
Object oriented
programming
provides data
hiding so it is
more secure.
In procedural
programming,
overloading is not
possible.
Overloading is
possible in object
oriented
programming.
In procedural
programming,
function is more
important than
data.
In object oriented
programming,
data is more
important than
function.
Procedural
programming is
based on unreal
world .
Object oriented
programming is
based on real
world .
Examples: C,
FORTRAN,
Pascal, Basic
etc.
Examples: C++,
Java, Python, C#
etc.