0% found this document useful (0 votes)
143 views

Programming Paradigm

The document presents information on various programming paradigms. It discusses imperative, declarative, functional, and object-oriented programming paradigms. It also covers multi-paradigm programming languages that support more than one paradigm. Examples of languages that follow different paradigms are provided. The document concludes that while no consensus exists, procedural and object-oriented paradigms using languages like C, C++, and Java tend to be popular for introductory courses.

Uploaded by

Malak Yasir
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
143 views

Programming Paradigm

The document presents information on various programming paradigms. It discusses imperative, declarative, functional, and object-oriented programming paradigms. It also covers multi-paradigm programming languages that support more than one paradigm. Examples of languages that follow different paradigms are provided. The document concludes that while no consensus exists, procedural and object-oriented paradigms using languages like C, C++, and Java tend to be popular for introductory courses.

Uploaded by

Malak Yasir
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 14

Presentation

On
Programming Paradigm

Under Supervision of:


Prof. M.U. Bokhari Presented By:

Prof. R.Z. Khan Shoaib Nusrat

Dr. Swaleha Zubair BCA V SEM

Mrs. Sajida Khatoon GH5204

Mr. Mohd. Zeyauddin 15CAB03


CONTENT
 Introduction
 History
 Imperative Programming Paradigm
 Declarative Programming Paradigm
 Functional Programming Paradigm
 Object Oriented Programming Paradigm
 Multi-Paradigm
 A glance of different Paradigms
 Conclusion
 References
INTRODUCTION
What is programming paradigm ?

 A programming paradigm is a fundamental style of


computer programming.
 Paradigms differ in the concepts and methods used
to represent the elements of a program (such as
objects, functions, variables, constraints).
 And also steps that comprise a computation (such
as assignations, evaluation, continuations, data
flows).
HISTORY
 Different approaches to programming
have developed over time.
 The concept of a "programming paradigm" as
such dates at least to 1978.
 The lowest-level programming paradigms
are machine code.
 In the 1960s, assembly languages were
developed followed by development of
procedural languages.
 Following the widespread use of procedural
languages, object-oriented programming (OOP)
languages were created and followed by many
more…
IMPERATIVE PROGRAMMING PARADIGM

 Imperative programming is a programming


paradigm that uses statements that change a
program's state.
 In much the same way that the imperative
mood in natural languages expresses commands.
 An imperative program consists of commands for
the computer to perform.
 Imperative programs describe the details of HOW
the results are to be obtained.
 HOW means describing the Inputs and describing
how the Outputs are produced.
 Examples are: C, C++, Java, PHP, Python, Ruby etc.
DECLARATIVE PROGRAMMING PARADIGM

 Declarative programming is a programming


paradigm—a style of building the structure and
elements of computer programs—that expresses the
logic of a computation without describing its control
flow.
 Declarative programming focuses on what the
program should accomplish.
 Declarative programming often
considers programs as theories of a formal logic,
and computations as deductions in that logic space.
 Examples are: SQL, XSQL (XMLSQL) etc.
FUNCTIONAL PROGRAMMING PARADIGM

 Functional programming is a subset of declarative


programming.

 Programs written using this paradigm use functions, blocks of


code intended to behave like mathematical functions.

 Functional languages discourage changes in the value of


variables through assignment, making a great deal of use of
recursion instead.
 Examples are : F#, Haskell, Lisp, Python, Ruby, JavaScript etc.
OBJECT ORIENTED PROGRAMMING PARADIGM
 Object-oriented programming (OOP) is a
programming paradigm based on the concept of
"objects", which may contain data, in the form of
fields, often known as attributes; and code, in the
form of procedures, often known as methods.
 There is significant diversity of OOP languages, but
the most popular ones are class-based, meaning
that objects are instances of classes, which
typically also determine their type.
 In OOP, computer programs are designed by
making them out of objects.
 Examples are: C++, C#, Java, PHP, Python.
MULTI PARADIGM
 A multi-paradigm programming language is a
programming language that supports more than
one programming paradigm.
 The design goal of such languages is to allow
programmers to use the most suitable programming
style and associated language constructs for a
given job.
 Languages such as C++, Java, Python are multi-
paradigm programming languages that support
object-oriented programming to a greater or lesser
degree, typically in combination with imperative,
procedural programming.
A Glance of different paradigms
Paradigm Description Examples
Programs as statements
that directly change C, C++, Java, PHP,
Imperative
computed state Python, Ruby.
(datafields).

Treats computation as the


C++, Lisp, Python, JavaS
Functional evaluation of mathematical
cript
functions avoiding state.

Treats datafields as object


C++, C#., Java, PHP,
Object-oriented s manipulated through
Python .
predefined methods only

Defines program logic, but


Declarative SQL, CSS.
not detailed control flow
CONCLUSION
 There is still not a consensus (and probably
there will never be) on a programming paradigm
and a programming language is most suitable.
 All approaches have their advantages and
disadvantages, with many supporting arguments and
Case-studies.
 Despite that, it seems that nowadays the most popular
paradigms for introductory courses are the procedural,
with programming language C and procedural part of
C++, the object-oriented, with languages Java and C++.
REFERENCES

 docs.microsoft.com
 www.wikipedia.com
QUERIES
OR
SUGGESTIONS
Thanks

You might also like