Your SlideShare is downloading. ×
Programming Paradigms Seminar 1
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×

Introducing the official SlideShare app

Stunning, full-screen experience for iPhone and Android

Text the download link to your phone

Standard text messaging rates apply

Programming Paradigms Seminar 1

2,077
views

Published on


0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
2,077
On Slideshare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
86
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Seminar 1 : The bird’s eye view
    The Paradigms
    Programming Paradigms
  • 2. Outline
    Programming Paradigms
    4 Main Programming Paradigms
    Learning Objective
    Plans
    2
  • 3. Solution:
    Find info from books
    Paradigm A
    Problem:
    Assignment
    Solution:
    Copy from classmates
    Paradigm B
    Paradigm - Student
  • 4. Paradigm – The Dancer
    664
    X 5
    RIGHT BRAIN
    (clockwise)
    Intuitive
    Images
    Non-linear
    Big picture
    abstract
    LEFT BRAIN
    (counter –clockwise)
    Analytical
    Numbers
    Linear
    Details
    Concrete
  • 5. A programming paradigm is a framework that define how the user conceptualized and interpret complex problems.
    Paradigm A
    Solution:
    A
    Problem:
    Create a calculator program
    Solution:
    B
    Paradigm B
    Programming Paradigm
  • 6. Paradigms VsLanguages
    Programming Paradigm:
    A programming paradigm is an approach to programming a computer based on a mathematical theory or a coherent set of principles.
    Programming language:
    A programming language is a tool for developing executable models for a class of problem domains.
    6
    In general, programming paradigms influence language design.
  • 7. Why Programming Paradigm?
    7
    Model 1
    Model 2
    Problems
    Paradigm A
    Model 3
    Model 4
  • 8. Overview of 4 Programming Paradigms
    8
  • 9.
    • View everything as an “object”
    • 10. Key characteristic of OO
    • 11. Data Abstraction
    • 12. Encapsulation
    • 13. Polymorphism
    • 14. Inheritance
    • 15. Best for problems with a large number of related data abstractions organized in a hierarchy
    Object-Oriented Paradigm
    9
    Human
    “Alice”
    Name:
    Gender:
    Size:
    Eue _colour:
    Shopping()
    Animal
    Building
    “Bob”
  • 16. Object-Oriented Paradigm
    Question:
    Is Object-Oriented the best paradigm for solving every problems?
    If so, there wouldn’t be a need for other paradigm…
    calSal()
    Find the payroll of the salaries for all the employee in the company
    Employee 1
    getSal()
    return amt1
    Company
    sumAll()
    calSal()
    getSal()
    Overheads!!
    return amt1
    Employee 10000
  • 17. Imperative Paradigm
    11
    Analogy:
    Cooking a cup noodles
    Order of Commands is Important!!
    • View everything as
    “a sequence of steps to perform”
    • Characterized By
    • 18. Procedures
    • 19. Functions
    • 20. Abstract Data Types (ADTs)
    • 21. Best for expressing algorithms and the most common paradigm in use today
  • Functional Paradigm
    12
    Resulting Value
    An Expression
    Another Expression
    Used By
    Evaluates
    Evaluates
    • View everything as “functions”
    • 22. Characterized by
    • 23. Single Assignment
    • 24. Referentially Transparent
    • 25. Compositionality
    • 26. Higher Order Function
    • 27. Best for abstracting and reducing complexity in programming task with noside effects
  • Logic Paradigm
    13
    Object-Oriented
    Imperative
    Functional
    Logic
    Automated
    Search
    List all programming paradigms
    Answer a question via search for a solution
    • View everything as “Predicate Calculus”
    • 28. Characterized by
    • 29. Axioms
    • 30. Facts
    • 31. Inference rules
    • 32. Queries
    • 33. Best for solving problems in artificial intelligence such as medical diagnosis, fault finding in equipment and robot control
  • Learning Objective
    • Each paradigm has its place
    • 34. Learning different paradigms allow us to
    • 35. Identify suitable paradigms for a given complex problem
    • 36. Decide the most suitable language to implement
    • 37. Reason for focusing on paradigms
    • 38. Increasing number of programming languages implementing similar paradigms exists
    • 39. 27 paradigms in total but some are in similar concept
    • 40. Studying the 4 distinct basic paradigms allow us to easily pick up any programming languages on our own!
    14
  • 41. 15
  • 42. Plans
    Research [S2]
    Paradigms
    Advantages & Disadvantages
    Case Studies / Examples
    Project [S3 / S4]
    Conclusion [S4]
    Summary and reflections
    16
  • 43. 17
    Summary
  • 44. Thank you!
    End of Presentation
  • 45. 19
    WAIT!
    Please help us to help you!
    3-5 min survey