0
1.6kviews
Differentiate between procedure and object oriented language.
1 Answer
0
28views

Procedure oriented programming language

A procedure oriented programming language is one in which procedure i.e. method or functions are given more significance. Here, one function calls another.

There can be global variables and local variables to each function.

Figure below shows how a procedure oriented programming operates.

In this type of languages the task is divided into smaller tasks or sub tasks called as procedures or functions or methods.  Any function can be called at any instant.

There are global and local variables as seen in the Fig. The global variables can be accessed by all the functions, while the local variables are local to the corresponding function.

A procedure oriented programming language follows top bottom approach.

Top bottom approach refers to approaching to a problem as a big task or as a whole. Then dividing this task into small instructions or operations. Hence, initially the task is broken into small tasks and then these smaller tasks are written in detail.

The disadvantage of such type of programming is that it is difficult to trace which functions are using a data and also error correction is difficult.

C programming language is an example of procedure oriented language.

Fig.: Structure of a procedure oriented programming language

Object oriented programming language

Object oriented programming as the name says gives more significance to the objects which has data and functions built around it.

The data of the object can be accessed by the functions associated with it. The functions of one object can access the data of another object through the functions of that object.

Object oriented programming uses bottom up approach wherein the smaller tasks are first dealt in detail and gradually creating the entire huge system.

Fig. below shows the structure of a object oriented programming language.

C++ and Java are examples of object oriented programming languages.

Fig.: Structure of an Object Oriented Programming

Please log in to add an answer.