Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
PROCEDURAL ORIENTED PROGRAMMING VS OBJECT ORIENTED PROGRAMING
1. TAE 2
Subject: Object Oriented Programming
Topic: Procedure Oriented Programming
vs.
Object Oriented Programming
Guided by:
Ms. Diksha Bhoyar
Group No : 06
(SCOB48) Uttam Singh
2. Procedure Oriented
Programming
Object Oriented
Programming
Program is divided into parts called
objects.
OOP has access specifiers named
Public, Private, Protected, etc.
Provides Data Hiding so provides
more security.
In OOP, overloading is possible in
the form of Function Overloading
and Operator Overloading.
In OOP, data can not move easily
from function to function, it can be
kept public or private so we can
control the access of data.
Example of OOP are : C++, JAVA,
VB.NET, C#.NET.
In POP, program is divided into small
parts called functions.
POP does not have any access specifiers
(I.e) by default it is public only.
POP does not have any proper way for
hiding data so it is less secure.
In POP, Overloading is not possible.
In POP, Most function uses Global data
for sharing that can be accessed freely
from function to function in the system.
Example of POP are : C, VB, FORTRAN,
Pascal.
3. REAL TIME EXAMPES OF POPS AND
OOPS WITH SOME SITUATION
Suppose that we suddenly need to add a bus form, that
records the following information:
Color, Engine Size, Transmission Type
Number of passengers
Procedural: We need to recreate the entire form, repeating
the code for Color, Engine Size, and Transmission Type.
OOP: We simply extend the vehicle class with a bus class and
add the method, number Of Passengers.
4. SITUATION 2
If the client in vehicle company wants to change
the colors of all the vehicles for some reason.
Procedural: We have to change three different
forms: cars, trucks, and buses color differently
one by one for the client as its follows procedure
step by step .
OOP: We change the color method in the vehicle
class and because the car, truck, and bus classes
all are inherited from one derived class they are
automatically updated.
5. Procedure Oriented
Programming
Object Oriented
Programming
Advantages
It is easy to understand.
It models the real world(i.e) it can
be easily extended.
It offers reusability (i.e) already
created classes can be reuse without
having to write them again.
These are easier to test and
maintain.
Disadvantages
It needs a proper planning and
proper designing
Program designing is sometime
tricky.
Advantages
Its relative simplicity, and ease of
implementation of compilers and
interpreters.
An easier way to keep track of program
flow.
Needs only less memory.
Disadvantages
Data is exposed to whole program, so no
security for data.
The does not offer the ability to re-use
the same code at different places.
Difficult to relate with real world objects.
Difficult to create new data types reduces
extensibility.