Latest Post

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
  1. Unstructed Programming (or) Monolithic Programming
  2. Procedural Programming
  3. Structural Programming
  4. 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
                         Eg, Assembly Language, BASIC.

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:
  1. Large Programs are divided in to small function or Procedure.
  2. Uses Top-Down programming Approach.
  3. Data moves freely from one function to another.
  4. Most of the functions share common data.
  5. Emphasis is given for algorithms.
Disadvantages:
  1. Very difficult identify which data is used by which function.
  2. Error Correction is difficult.
Structural Programming:
  • 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.
               Example: ADA, C++.




Object Oriented Programming:
  • 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:
  1. Emphasis is given on data rather than procedures.
  2. Problems are divided into objects.
  3. Data structures are designed such that they organize the object.
  4. Data and function are tied together.
  5. Data hiding is possible.
  6. New data and functions can be easily loaded.
  7. Object can communicate with each other using functions.
  8. Bottom-up programming approach is used
Difference between Structured and Object Oriented Programming
 
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:




SHARE THIS POST

Author: Robin Saxena
I m computer science student and i Interested in cs, c/c++ programming, java, html ,Photography , Music , and generally connecting with others.