What is Procedure Oriented Programming and Object Oriented Programming
You might have come across many programming languages,
but those languages are either based on POP or OOPs concept. Let’s discuss them
Procedure Oriented Programming (POP)
POP is a programming language derived from imperative
programming based on the concept of the procedure call. Imperative
programming means it can describe steps that change the state of the computer.
POP was first developed around the year 1950s. POP is one of the common
programming languages.
A procedure call is also known as routines, subroutines, or functions used to perform a specific task. Procedures contain a series of
computational steps that are to be carried out, they might be called anytime
during the execution of a program. POP follows a top-down approach and treats
procedure and data as two different entities. C, Pascal, Basic, COBOL and ALGOL
are some of the procedural programming languages.
Ø Key features
of POP:-
1)
Pre-defined functions
2)
Local variables
3)
Global variables
4)
Parameter passing
5)
Modularity
Ø
Advantages:-
1)
It is good for general-purpose programming
2)
Has standard method to solve a problem
3) The flow of the program can be tracked easily
4)
Uses less memory
5)
Compilation speed is fast compared to OOPs
Ø Disadvantages:-
1)
Real-world objects are difficult to relate
2)
It is less secure as data is exposed to the whole
program
3)
Has no restriction to access the global variable which may
lead the new programmer to corrupt the data accidentally by creating a function
4)
Difficult to modify and maintain
Object-Oriented Programming (OOP)
OOP is based on the concept of objects; objects can contain data
and code. It follows a bottom-up approach. OOP focuses on data rather than on
functions or procedures. In OOP objects can communicate with each other through
functions (method). Objects are instance of a class.
Class is a user-defined data type that holds data members and member
functions that can be accessed and used by creating an instance of that class
i.e. object. C++, JAVA, JavaScript, Python, PHP, C#, Ruby, Perl are some of the
object-oriented programming languages.
Ø Key features
of OOP:-
1)
Data Encapsulation
2)
Data Abstraction
3)
Polymorphism
4)
Inheritance
Ø Advantages
1)
Easy to maintain
2)
Re-usability
3)
It provides better security due to data abstraction
4)
Redundancy
Ø
Disadvantages
1)
Requires more space
2)
Speed is slow
3)
Programs are tricky to design
4)
Programmer must be well skilled
-Sanket Mungarwadi
Comments