Download presentation
Presentation is loading. Please wait.
1
Overview of Programming Paradigms
2
Definitions Programming Paradigm Programming Language
programming “technique” (?) way of thinking about programming view of a program Programming Language consists of words, symbols, and rules for writing a program
3
Programming Paradigms
Imperative Programming program as a collection of statements and procedures affecting data (variables) Object-Oriented Programming program as a collection of classes for interacting objects Functional Programming program as a collection of (math) functions
4
Some Languages by Paradigm
Imperative (also called Structured or Procedural) Programming FORTRAN, BASIC, COBOL, Pascal, C Object-Oriented Programming SmallTalk, C++, Java Functional Programming LISP, ML, Haskell
5
History of Languages 1950s to 1960s 1960s to 1970s 1970s to 1980s
FORTRAN, COBOL, LISP, BASIC 1960s to 1970s (ALGOL-based) Pascal and others 1970s to 1980s Prolog, C, Ada 1980s to 1990s C++, ML, Perl, Java
6
Paradigm Change For example, from Structured to Object-Oriented
Arises from problems encountered in one paradigm but addressed in another Case study: from C to C++ Evolution from structured, to modular, to object-based, to object-oriented programming
7
Object-Oriented Programming
Incorporates both encapsulation and inheritance through the class concept Focus is on writing good classes and on code reuse Examples Shape, Circle, and Rectangle in a drawing program Employee, Faculty, Staff in a university personnel system
8
Imperative Programming
IT 240
9
Imperative Programming
Variables, assignment, sequencing, iteration, procedures as units State-based, assignment-oriented Global variables, side effects Program units: Data (Variables) and Computation (Statements and Routines)
10
Data and Computation Binding Data Computation Variables Data types
Assignments and expressions Control structures Subprograms / routines
11
Modularity Interface and Implementation Compilation Libraries
Independent Separate Libraries
Similar presentations
© 2024 SlidePlayer.com Inc.
All rights reserved.