No
|
Procedural Programming
|
Object oriented Programming
|
||||||||||||||||||
1
|
It is a Top-Down approach.
|
It is a Bottom-Up approach.
|
||||||||||||||||||
2
|
PP basically consists of writing a list of
instructions for the computer to follow, and organizing these instructions
into groups known as functions.
|
OOP allows decomposition of a problem into
a number of entities called objects and then builds data and functions around
these objects.
|
||||||||||||||||||
3
|
This paradigm is:
“Decide which
procedures you want; use the best algorithms you can find”.
|
This paradigm is:
“Decide which
classes and objects are needed; provide a full set of operations for each
class”.
|
||||||||||||||||||
4
|
Languages support this paradigm by
providing facilities for passing arguments to function and returning values
from functions.
|
Languages support this paradigm by creating
objects and send the messages to them to use or manipulate the attributes.
|
||||||||||||||||||
5
|
Importance given to algorithms rather than
data.
|
Importance given to data rather than
algorithms.
|
||||||||||||||||||
6
|
Data move openly around the system from
function to function.
|
Data cannot move openly around the system
as the concept of data hiding is involved.
|
||||||||||||||||||
7
|
E.g. C, COBOL, FORTRAN.
|
E.g. C++, JAVA.
|
||||||||||||||||||
8
|
Relationship of data and functions is:
|
Organization of data and functions in OOP:
Object A
Object B
![]() ![]() ![]() ![]() ![]() ![]()
![]()
![]() ![]()
Communication
Object C
|
||||||||||||||||||
9
|
The primary focus is on functions.
|
The primary focus is on objects.
|
||||||||||||||||||
10
|
It is suitable for creating medium size
projects.
|
It is suitable for creating large size
projects.
|
||||||||||||||||||
11
|
It does not model real world problems very
well.
|
It can model real world problems.
|
||||||||||||||||||
12
|
The complexity of the programs is very
high.
|
The complexity of the programs is less.
|
Labels: C++