Computing‎ > ‎A2 COMP‎ > ‎COMP3‎ > ‎Programming Concepts‎ > ‎

Programming Paradigms

 Imperative (Procedural)                                                                            P69

A program written using a sequence of instructions (statements) executed in the order designed by the programmer. They manipulate variables and data structures. Early languages like machine code and assembly were imperative. E.G. Fortran

 Functional Programming

Where programs define mathematical functions. A program can consist of a series of function calls. There are no variables or assignment, but lists and functions that manipulate lists. Haskell and Lisp are two functional languages. (Octave)

 Logic Programming

A knowledge base is built up through writing a set of facts and rules about a specific area of expertise. An interface engine (program) can go through the knowledge base to answer queries in the form of a goal. Prolog (Programming Logic) is an example and is used in artificial intelligence and expert systems.

 Event-driven Programming

An event is an action or occurrence detected by a program e.g. clicking a button. Instead of the instructions being executed in the order the programmer designed like imperative, subroutines are executed in response to events.

 Object-oriented Programming                        WikiBooks OOP

A structured programming approach where problems are broken down into routines that execute a single task. Data can be passed in to routines through interfaces (parameters). OOP can reduce development time and improve reliability of code as Objects can be reused. Data items stored are known as fields and the routines are known as methods.

                                                                        Methods = function + procedures

Comments