During developing computer science appeared a huge problem - how explain to computer what people need. Since that moment there were a lot of different and interesting suggestions, but the most suitable solution was creating a programming languages. One of the most colossal type of programming languages is programming paradigm. "A programming paradigm is an approach to programming a computer based on a mathematical theory or a coherent set of principles."(Van Roy 2010). There is a large number of various paradigms in programming languages but four of them is major. These paradigms are: Imperative, Object-Oriented, Functional and Logic paradigms. 2. IMPERATIVE PARADIGM
Imperative programming is a programming paradigm which sequentially execute commands to get a result. Sequence has an important role in Imperative paradigm because with different sequences the result will have a different values. Hence " Imperative programming is characterised by programming with states and commands which modify these states."( http://www3.ul.ie/~library/pdf/citeitright.pdf ,no date). For easier working with Imperative paradigm the sequence of commands can be named. For example if some sequence of commands was named then programmer can trigger it in any place of the program using just name of sequence. Named sequence called subroutines. Imperative paradigm with one or more subroutines called procedural programming.The two most usful imperative languages are Pascal and C.
Advantages: Significant feature as well as a main advantage of imperative programming is opportunity to reuse a code which already exist and implement some activities.
Disadvantages: In large programs it is difficult to fix bugs because imperative programming based on sequence of activities and some of them can be connected.For example if in the beginning of program some activity(with bug) have connection with activity in the end of program , the second activity will have the bug due to first. 3. OBJECT-ORIENTED PARADIGM
Object-Oriented programming is a programming paradigm which gets a result by cooperation of objects. "Objects are key to understanding object-oriented technology"( Http://docs.oracle.com/javase/tutorial/java/concepts/object.html ,no date ). Objects consist of data fields and related methods, where fields are variables and methods are functions. Object has a list of all possible interactions between itself and external object(it might be anyone such as programmer or end user). Therefore objects can be modified without changing external interface and classes also can be added- it is one of the most important principles of Object-oriented programming." A class is the blueprint from which individual objects are created." (Http://docs.oracle.com/javase/tutorial/java/concepts/object.html ,no date). According to object's internal state, methods work for connection between one object to another. " Hiding internal state and requiring all interaction to be performed through an object's methods"( Http://docs.oracle.com/javase/tutorial/java/concepts/object.html ,no date)-it is another important principle also it is a fundamental feature of the Object -Oriented programming also known as data encapsulation. There are four another fundamental features in Object-Oriented programming: Inheritance, Polymorphism,Dynamic dispatch and Open recursion. Inheritance is creating a superclass which consists of...
Bibliography: 'Functional programming '(2012)Wikipedia. Available at: http://en.wikipedia.org/wiki/Functional_programming#Pure_functions (Accessed: 16 Oct 2012).
Http://docs.oracle.com/javase/tutorial/java/concepts/object.html (no date)(Accessed 16 Oct 2012).
Http://www3.ul.ie/~library/pdf/citeitright.pdf (no date) (Accessed: 7 Oct 2012).
'Imperative programming '(2012)Wikipedia. Available at: http://en.wikipedia.org/wiki/Imperative_programming (Accessed: 16 Oct 2012).
'Logic programming '(2012)Wikipedia. Available at: http://en.wikipedia.org/wiki/Logic_programming (Accessed: 16 Oct 2012).
'Object-oriented programming '(2012)Wikipedia. Available at: http://en.wikipedia.org/wiki/Object-oriented_programming#Criticism (Accessed: 16 Oct 2012).
Peter,V.R.(2010)Programming Paradigms for Dummies: What Every Programmer Should Know.Available at: http://www.info.ucl.ac.be/~pvr/VanRoyChapter.pdf (Accessed: 7 Oct 2012).
Praguecollege(2012) Programming languages: Paradigms. Available at: http://courses.praguecollege.cz/mod/page/view.php?id=60629&inpopup=1 (Accessed 16 Oct 2012).
Sylwia,O. (2008)CA215 Languages & Computability: Functional Programming. Available at: http://www.computing.dcu.ie/~sozdowska/teaching/ (Accessed 16 Oct 2012).
Please join StudyMode to read the full document