Paradigms of Programming Languages
The Paradigms of programming Language gives the model to the
programmer to write the programs.The different Paradigms of programming
languages are
Monolithic Programming:
Procedural Programming:
Features of procedure oriented Programming:
Object Oriented Programming:
Features:
Programming Paradigms - Presentation:
- Unstructed Programming (or) Monolithic Programming
- Procedural Programming
- Structural Programming
- Object Oriented Programming
Monolithic Programming:
- In this whole problem is solved as a single block.
- All the data are global and there is no security.
- To share the codes jumps are allowed and so contain lot of go to statements.
- This is suitable only for small problem.
- Difficult to follow and correct errors
Procedural Programming:
- The given problem is divided in to a number of sub problems depending upon its functionality.
- The sub problems are called procedures or Methods.
- Any procedure can be called at any point during the program execution.
- The program has global and local variables.
- Global variables can be only be used
Features of procedure oriented Programming:
- Large Programs are divided in to small function or Procedure.
- Uses Top-Down programming Approach.
- Data moves freely from one function to another.
- Most of the functions share common data.
- Emphasis is given for algorithms.
- Very difficult identify which data is used by which function.
- Error Correction is difficult.
- The program is divided into modules and the modules are then divided into functions.
- The usage of goto statement is removed or reduced.
- Each module can work independent of one another.
- The Program is divided into number of small units called Object. The data and function are build around these objects.
- The data of the objects can be accessed only by the functions associated with that object.
- The functions of one object can access the functions of other object.
Features:
- Emphasis is given on data rather than procedures.
- Problems are divided into objects.
- Data structures are designed such that they organize the object.
- Data and function are tied together.
- Data hiding is possible.
- New data and functions can be easily loaded.
- Object can communicate with each other using functions.
- Bottom-up programming approach is used
Structured Programming | Object-oriented Programming |
Top-down approach is followed. | Bottom-up approach is followed. |
Focus is on algorithm and control flow. | Focus is on object model. |
Program is divided into a number of sub modules or functions or procedures. | Program is organized by having a number of classes and objects. |
Functions are independent of each other. | Each class is related in a hierarchical manner. |
No designated receiver in the function call. | There is a designated receiver for each message passing. |
Views data and functions as two separate entities. | Views data and functions as a single entity. |
Maintenance is costly. | Maintenance is relatively cheaper. |
Software reuse is not possible. | Helps in software reuse. |
Function call is used. | Message passing is used. |
Function abstraction is used. | Data abstaction is used. |
Algorithm is given importance. | Data is given importance. |
Solution is solution-domain specific. | Solution is problem-domain specific. |
No encapsulation. Data and functions are separate. | Encapsulation packages code and data altogether. Data and functionalities are put together in a single entity. |
Relationship between programmer and program is emphasized. | Relationship between programmer and user is emphasized. |
Data-driven technique is used. | Driven by delegation of responsibilities. |
Programming Paradigms - Presentation: