1.1 Overview of Procedure Oriented Programming
Procedure Oriented Programming contains step by step procedure to execute. The problems first divided into small parts and then to solve each part one or more functions are used. Thus in POP approach, the problem is viewed as a sequence of things to be done, such as, input taking, calculating and displaying. The primary focus stays on functions which are used to accomplish each task.
For example, considering that we have to take two values from user and then to display the product of the inputted values. In POP approach this problem may be decomposed as following,
- First take an input and put it under one variable, Let us define it as a.
- Then take another input and put it under another variable, Let us define it as b.
- Now define another variable c, and store the product to it: c = a + b.
- Now display c.
In Short, POP consists of set of instructions to be followed and divide these instructions into smaller parts known as functions. Examples of POP are C, VB, FORTRAN, Pascal e.t.c.
Features of POP :
- Mainly focused on writing the algorithms.
- Most function uses Global data for sharing which are accessed freely from function to function in the system.
- POP follows the top down approach in program design.
- It does not have data hiding options.
- Functions transform data from one form to another.
- Data can be moved openly from one function to another around the system.
- Sub-division of large program into smaller programs called functions.
- Overloading process is not applicable in POP.
- C languages uses the set of instruction to inform/guide computer what to do step by step.
- Its depend in the procedures, more specifically routines or sub routines.
- As it follows the procedures hence it adopt top-down approach.
- C languages is much focused on the data and hence on functions.
- It is also known as structured programming language.