Solution: Find info from books Paradigm A Problem: Assignment Solution: Copy from classmates Paradigm B Paradigm - Student
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
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
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.
Why Programming Paradigm? 7 Model 1 Model 2 Problems Paradigm A Model 3 Model 4
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”
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
Imperative Paradigm 11 Analogy: Cooking a cup noodles Order of Commands is Important!!