OOPS - Introduction to Programming Paradigms, Study notes of Object Oriented Programming

In this document topics covered which are Introduction to Programming Paradigms, The major paradigms, Procedural Programming, Object Oriented Programming, Functional Programming, Logical Programming.

Typology: Study notes

2010/2011

Uploaded on 09/05/2011

vrunda
vrunda 🇮🇳

4.1

(21)

76 documents

1 / 4

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Introduction to Programming Paradigms
A programming paradigm is a general approach to programming or to the solution
of problems using a programming language.
Thus programming languages that share similar characteristics are clustered
together in the same paradigm.
A programming language is a formal language for some form of problem solving.
It is to be distinguished from design languages such as hardware description
languages, and other descriptive languages such as document description
languages (e.g. SGML and HTML) or grammars.
A programming paradigm is both a method of problem solving and an approach
to programming language design
The major paradigms are:
Procedural
Object-oriented
Functional
Logical
Data base query languages
Visual
Scripts
Procedural Programming
Procedural programming is by far the most common form of programming.
A program is a series of instructions which operate on variables. It is also known
as imperative programming.
Examples of procedural programming languages include FORTRAN, ALGOL,
Pascal, C, MODULA2, Ada, BASIC
Advantages:- Procedural programming include its relative simplicity, and ease of
implementation of compilers and interpreters. Procedural languages were
important in the history of computers due to their low memory utilisation.
PAGE 3
pf3
pf4

Partial preview of the text

Download OOPS - Introduction to Programming Paradigms and more Study notes Object Oriented Programming in PDF only on Docsity!

Introduction to Programming Paradigms

  • A programming paradigm is a general approach to programming or to the solution of problems using a programming language.
  • Thus programming languages that share similar characteristics are clustered together in the same paradigm.
  • A programming language is a formal language for some form of problem solving.
  • It is to be distinguished from design languages such as hardware description languages, and other descriptive languages such as document description languages (e.g. SGML and HTML) or grammars.
  • A programming paradigm is both a method of problem solving and an approach to programming language design

The major paradigms are:

  • Procedural
  • Object-oriented
  • (^) Functional
  • Logical
  • Data base query languages
  • Visual
  • (^) Scripts

Procedural Programming

  • Procedural programming is by far the most common form of programming.
  • A program is a series of instructions which operate on variables. It is also known as imperative programming.
  • Examples of procedural programming languages include FORTRAN, ALGOL, Pascal, C, MODULA2, Ada, BASIC
  • (^) Advantages:- Procedural programming include its relative simplicity, and ease of implementation of compilers and interpreters. Procedural languages were important in the history of computers due to their low memory utilisation.
  • Disadvantages:- Procedural programming tends to be relatively low level compared to some other paradigms, and as a result can be very much less productive. Object Oriented Programming
  • Object oriented programming was introduced by Xerox with the language Smalltalk.
  • The most widely used object oriented language is C++ which provides object extensions to C, but this is rapidly being overtaken by Java.
  • (^) Object oriented programming is characterized by the defining of classes of objects, and their properties.
  • Object oriented programming has proved to be particularly successful in the design of user interlaces. Functional Programming
  • Functional programming is based upon the notion of a program as a function in a similar sense to its usage in mathematics. Programs are designed by the composition of functions.
  • (^) The earliest functional language is LISP. This was based upon the lambda calculus. LISP stands for LIST Processing, and it is the main language used for list processing applications.
  • Other functional languages include SCHEME, HOPE and ML.
  • The major advantages of functional programming are that programs can be easy to understand and to formally reason about, and that functions are very reusable.
  • The major disadvantage of functional programming is the difficulty of doing input-output since this is inherently non functional.

Logical Programming

  • Logic programming is usually equated with PROLOG programming
  • Logic programming adopts a different approach to problem solving to both procedural programming and functional programming.
  • A PROLOG program consists of facts and rules. Running a program consists of asking a query about a fact.

Evolution of programming paradigm Software experts point out, complexity of software is an essential property. Complexity is derived from

  1. complexity of problem domain
  2. difficulty of managing development process
  3. flexibility possible through software
  4. Problems of characterizing the behavior of discrete system.