Difference between Procedural, Structural and Object Oriented Programming languages
Key Difference: A procedural programming language consists of a set of procedure calls and a set of code for each procedure. A structural programming language emphasizes on separating a program’s data from its functionality. On the other hand, object oriented languages are based on entities known as objects.
A programming language is a language that consists of instructions designed for the computers. Processors only understand machine code as it reaches in two series of 0’s and 1’s, also known as binary data. Machine code is difficult to understand, and thus various programming languages are being used which are more understandable than the machine code and also provides greater portability.
There are various standards based on which the classification of programming languages can be obtained. However, based on the programming paradigm, one can broadly classify them into three categories: Procedural Programming Languages, Structured Programming languages, and Object oriented Languages.
Procedural Programming Languages: These languages code programs in such a way that the program executes statement by statement, reading and modifying a shared memory. This programming style can be closely associated with the conventional sequential processors linked to a random access memory (RAM). It contains all features of procedural programming as well as some other additional features.
Thus, we can refer to it as a programming language that executes a set of commands in order. These languages are based on the concept defined by the procedure calls. It means that statements are organized into procedures. These procedures are also known as subroutines or functions. The most important advantage of forming procedures is that the procedures are compact and they are also bounded by scope. It is written in a step by step manner, thus it is very easy to follow the smaller programs.
Examples Pascal. Fortran , COBOL
Structured Programming languages: These are based on the top down methodology in which a system is further divided into compositional subsystem. The structured programming concept was formalized in the year 1966 by Corrado Böhm and Giuseppe Jacopini. They showed the theoretical computer program design with the aid of loops, sequences and decisions.
Structured programming is not only limited to the top down approach. It employs methods using:-
1. Top down analysis for problem solving: It focuses on dividing the problem into sub parts and hence simplifies the problem solving.
2. Modularization for program structure and organization: It organizes large instructions by breaking them into separate and smaller section of modules, sub routines and subprograms.
3. Structured code for the individual modules: Control structures are used to determine the exact order in which the set of instructions are to be executed. Therefore, a structured code does not involve GOTO statement as it represents no certain order of execution.
Example ALGOL, Pascal, Pl/I, C , Ada
Object oriented Languages: Object oriented program languages are based on the ‘objects’ rather than ‘actions’. This language gives more preference to data rather than logic. An object can be defined as the pairing of a piece of data with the operations that can be performed on it. It is one of the latest and powerful types. Objects are capable of storing information and they can also interact with other objects.
The three major concepts defined by a object programming language are:-
- Data encapsulation or data abstraction
- Inheritance or derivation
- Dynamic or runtime binding
Examples C++, C#, BETA, Chapel
Advantages of these languages are listed below:
Procedural | Structural | Object Oriented |
1.Simple, easy implementation of compilers and interpreters 2. The ability to re-use the same code at different places in the program without copying it. 3. An easier way to keep track of program flow. 4. The ability to be strongly modular or structured. 5. Needs only less memory. | 1. Programs are more easily and more quickly written 2. Programs are reliable as fewer organizational and logical errors occur during the initial stages of program development. | 1. Improved software development productivity due to modularity, extensibility and reusability. 2. Software Maintenance is improved 3. Reusability helps in faster development of programs, as the language comes worth rich library of objects 4. Lower cost of Development 5. Higher quality of software can be ensured |
ncG1vJloZrCvp2OxqrLFnqmeppOar6bA1p6cp2aZo7Owe8OinZ%2Bdopq7pLGMm5ytr5Wau2680aianpylp66tedKtqa6bpKq%2ForiMmqWdZZ%2BXt6av02amq6GVo8GmsIypqaifopa6rrXNoGSlmZ6cwqKzxKw%3D