Object Oriented Programming
November 3, 2016

Programming Paradigms

Four different programming Paradigms

  • Imperative Paradigm
  • Functional Paradigm
  • Logical Paradigm
  • Object Oriented Programming Paradigm

 

Imperative Paradigm: This is a traditional approach to the programming process; often termed the ’first do this then do that’ approach, it defines the programming process as a sequence of instructions (also called commands) that solve the problem faced at hand. A typical program is broken into a series of sub routines each solving the problem at hand and the data is passed from one routine to another until the final routine returns the desired output. The Imperative Paradigm is considered a straightforward abstraction of how the Von Neumann Computer works because of this straight forward nature it often resembles machine languages. As of matter of fact, machine languages are considered imperative in nature and FORTRAN was the first Non-machine imperative programming language. Others include, Basic, COBOL (Allborg University, 2010; Laird 2009).

Functional Paradigm: This paradigm is in many ways similar to the imperative Paradigm as it also involves breaking down the program into a series of sub routines that receive inputted data, process it and return output which may serve as input for the next routine. The major difference being that such sub routines are usually pre-defined functions that are simply called when needed. It is often termed the ‘Evaluate an expression and use the resulting value for something’ approach to programming. Some common functional programming languages include LISP and Scheme.  (Allborg University, 2010; Brookshear, Smith and Brylow, 2012 p. 245)

Logic Paradigm: This paradigm is more often used as part of another paradigm than being the sole paradigm in play. It is considered the ‘Answer a question via search for a solution’ approach because it involved processing each step of the program by analyzing a given set of rules commonly called clauses. This makes the program execution like systematic search through facts based on the given rules, and the direction of the processing is determined by the results of such analysis. (Brookshear, Smith and Brylow, 2012 p. 245;  Allborg University, 2010)

Object Oriented Paradigm: This is often considered the ’Objects approach’ due the fact that it involves simulation of an actual real world phenomena in the form of objects, the activities they perform (represented as methods of the object class), the classification of the group they belong to (class) and their interactions with other objects. Using this approach, a big software project in broken down and viewed as a collection of objects which interact with each other through their methods to solve a given problem. OOP is the most prominent programming language in use today. Some languages that promote this paradigm are Java, C and C#. (Brookshear, Smith and Brylow, 2012 p. 245)

 

References

Glenn Brookshear, David T. Smith and Dennis Brylow (2012) p. 245 – 247 Computer Science: An Overview 11th Edition Addison-Wesley ISBN 978-0-13-256903-3

Alex Laird (2009) The Four Major Programming Paradigms [Online Paper] 4th March Available at: http://alexlaird.name/content/uploads/2009/05/topicpaper17-thefourmajorprogrammingparadigms.pdf (Accessed on: 26th November 2012)

Allborg University www.aau.dk (2010) Overview of the four main programming paradigms [Lecture Notes Online]. 7th July Available at: http://people.cs.aau.dk/~normark/prog3-03/html/notes/paradigms_themes-paradigm-overview-section.html (Accessed on: 26th November 2012)

Ida M. Flynn Bookrags.com (n.d) Generations, Languages [Online]. Available at: http://www.bookrags.com/research/generations-languages-csci-01/ (Accessed on: 26th November 2012)

Robert Sedgewick and Kevin Wayne (2006) INTRODUCTION to programming in Java .[Online]. 13th  Nov. Available at: http://introcs.cs.princeton.edu/java/11precedence/ (Accessed on: 26th November 2012)

1 Comment

  1. member says:

    thanks…this helped a lot

Leave a Reply

Your email address will not be published. Required fields are marked *