♠ Posted by Unknown in Fundamentals,OOPS at 03:20
IntroductionProcedure Oriented Programming (POP) LanguageAdvantages & Disadvantages
Conventional
programming using high level language such as COBOL, FORTRAN, and C is commonly
known as Procedure Oriented Programming (POP). In Procedure Oriented approach
the problem is viewed as a sequence of things to be done such as radiant
calculating and printing a number of function are written to accomplish these
tasks. The primary focus is on functions.
A typical
program structure for procedural programming is shown below. The technique of
hierarchical decomposition has been used to specify the tasks to be completed
for solving a problem.
Advantages :
- Emphasis is on doing things
- Large program are divided into smaller programs known as functions.
- Most of the functions share global data.
- Data move the openly around the system from function to function.
- Functions transform data one from to another.
- Employs top-down approach in program design.
Disadvantages :
Procedure
Oriented Programming basically consists of writing a list to follow and
organizing these instructions into groups known as functions. We normally use
flowchart to organize these action and represent the flow of control from one
action to another. While we concentrate on the development of functions. Very
little attention is given to the data that are being used by various functions
what happens to the data? how are they affected by the function that work of
them?
In
multi-function program many important data item are placed as global so that they
may be accessed by all the functions each function may have its own local data.
Global data
are more well honorable to an inadvertent change by a function. In a large
program it is very difficult to identify what data is used by which function.
In case we need to revise an external data structure we also need to revise all
functions that access the data. This provides an opportunities bugs to creep
in.
Another
serious drawback with the procedural approach us that is does not model real
world problems very well. This is because functions are action oriented and do
not really correspond to the element of the problem.
0 comments:
Post a Comment