Procedure Oriented Programming Definition

Procedure Oriented Programming Definition

Procedure oriented programming (or POP) is that way of programming in which there are different functions made for performing different tasks. This is the basic definition of procedure-oriented programming. It is often called as procedural programming.

Here, a question may arise in your mind that What is procedure-oriented programming, and what are its main characteristics? Let's figure out this question.

Now You know that POP is the way of programming in which different functions are introduced for doing different tasks. 

In POP, the problems are considered as a sequence of things that is to be done like reading, calculating, and printing. 

Conventional programming by making use of high-level languages like Cobol, Fortran, and C, is known as Procedure Oriented Programming (POP). 

It focuses on procedure and algorithm is something that performs the calculation. It is also termed as structured programming.

It basically consists of writing a list of instructions for the computer to follow and organizing these instructions into groups known as functions.

The programs can be divided into what we call functions if it seems to be very large and each and every function has some specific task. This programming language is not extensible.


In POP, programs are divided into smaller parts which are called functions and data is not given so much importance. It follows a top-down approach.


It does not have access specifiers, the data can be move from one function to another function. Adding new data and functions is difficult. 


It has not a proper way of hiding the data and that's why it is considered to be less secure than Object-Oriented Programming. 


In POP, Functions overloading and method overloading is not possible but it allows us to re-use the code inside the program without re-typing the same code again and again which saves our time and also effort because we do not have to write the same code time and again. 


It also helps in reducing errors and bugs as we can reuse the working correct code and we do not have to write the same code again and again. 


In POP, it is clear that what the program is going to do and how it is going to do because each procedure has a name that explains for what purpose the lines of code are written. 


The programmer can reduce the length of the program and hence it is easier and faster to read and debug the entire code of the program. 


Procedure Oriented Programming and Object-Oriented Programming were invented because the length of the programs was getting lengthier and lengthier and it was very difficult to work with the lengthier programs.


So, there was a need for the programmers for more structure to clarify the programs. 
Let us see a simple C program.




Example: c program


#include<stdio.h>
#include<conio.h>
void main()
{
printf("Learning Mania: Learn New Things Everyday\n");
}


Output

Learning Mania: Learn New Things Everyday 




Here, #include<stdio.h> is a processor directive, used to interact with Input Output units.  main() is a function that indicates the starting point of the program.  { } Curly braces define the starting and the ending of the main function.


printf("Learning Mania: Learn New Things Everyday\n"); printf function prints whatever comes under double-quotes on the screen. In this case, it prints Learning Mania: Learn New Things Everyday on the screen as output.

\n is used to take the cursor to the next line after printing the text that is written inside printf function. ; the semicolon is used to terminate the executable statement. 

It is the executable statement in the program. Now it's time to know about the main characteristics of POP.

Characteristics of Procedure Oriented Programming (POP)

  1. It focuses on the algorithm.
  2. It makes use of a top-down programming approach.
  3. Data can be freely moved from one function to another function.
  4. Programs are divided into smaller programs which are often called functions.
  5. Functions may communicate with the global variable declared by the programmer while making a program.
  6. Data is not given so much importance.
  7. It is easier to read and debug the entire code of the program.

Advantages of Procedure Oriented Programming (POP)

  1. The program is divided into functions that have some specific tasks.
  2. Almost all functions share global declared data.
  3. The data can easily move from functions to functions.

Disadvantages of Procedure Oriented Programming (POP)

1. It is sometimes difficult to design a program because the data structure does not relate to the real world.
2. Every function has access to the global variables. It is a big disadvantage because anyone can manipulate and corrupt the data.
3. New data type cannot be created easily i.e; it has no extensibility.
4. Adding new data and functions is difficult.
5. It has not a proper way of hiding data. So, it is less secure.
6. Function overloading and method overloading is not possible.


These are the various problems created in Procedure oriented programming. It becomes a need for an easier way of designing a program in a very short period of time. That's why there is a need for Object-oriented programming.
Oldest

1 comments:

Click here for comments
Anonymous
admin
Fri Jun 01, 09:02:00 AM 2018 ×

nice'


Congrats bro Anonymous you got PERTAMAX...! hehehehe...
Reply
avatar

Comment Below: ConversionConversion EmoticonEmoticon