Programming Paradigms

Slides:



Advertisements
Similar presentations
Structures. Procedural (Imperative) Languages Procedural languages work on the basis of explicitly telling the computer ‘how to do something’; by using.
Advertisements

Programming Paradigms Introduction. 6/15/2005 Copyright 2005, by the authors of these slides, and Ateneo de Manila University. All rights reserved. L1:
Copyright © 2002 W. A. Tucker1 Chapter 1 Lecture Notes Bill Tucker Austin Community College COSC 1315.
Computers Are Your Future
CS105 INTRODUCTION TO COMPUTER CONCEPTS INTRO TO PROGRAMMING Instructor: Cuong (Charlie) Pham.
Programming Creating programs that run on your PC
Overview of Programming Paradigms
The Analytical Engine Module 6 Program Translation.
Computer Concepts 5th Edition Parsons/Oja Page 546 CHAPTER 11 Software Engineering Section A PARSONS/OJA Computer Programming.
High-Level Programming Languages
CS 101 Course Summary December 5, Big Ideas Abstraction Problem solving Fundamentals of programming.
Computers: Tools for an Information Age
Guide To UNIX Using Linux Third Edition
SOFTWARE SYSTEMS SOFTWARE APPLICATIONS SOFTWARE PROGRAMMING LANGUAGES.
Course: Introduction to Computers
Programming Paradigms Imperative programming Functional programming Logic programming Event-driven programming Object-oriented programming A programming.
Programming Languages – Coding schemes used to write both systems and application software A programming language is an abstraction mechanism. It enables.
Programming Languages: Telling the Computers What to Do Chapter 16.
Programming Languages
There are only 10 types of people in the world, those who understand binary and those who don't.
GENERAL CONCEPTS OF OOPS INTRODUCTION With rapidly changing world and highly competitive and versatile nature of industry, the operations are becoming.
O BJECT O RIENTATION F UNDAMENTALS Prepared by: Gunjan Chhabra.
UNIVERSITI TENAGA NASIONAL “Generates Professionals” CHAPTER 4 : Part 2 INTRODUCTION TO SOFTWARE DEVELOPMENT: PROGRAMMING & LANGUAGES.
COMPUTER PROGRAMMING Source: Computing Concepts (the I-series) by Haag, Cummings, and Rhea, McGraw-Hill/Irwin, 2002.
Higher Grade Computing Studies 2. Languages and Environments Higher Computing Software Development S. McCrossan 1 Classification of Languages 1. Procedural.
Programming. What is a Program ? Sets of instructions that get the computer to do something Instructions are translated, eventually, to machine language.
BIT 1003 – Presentation 7. Contents GENERATIONS OF LANGUAGES COMPILERS AND INTERPRETERS VIRTUAL MACHINES OBJECT-ORIENTED PROGRAMMING SCRIPTING LANGUAGES.
AS Computing Introduction to Programming. What is a Computer Program? A list of instructions that a computer must work through, in a logical sequence,
COMPUTER PROGRAMS AND LANGUAGES Chapter 4. Developing a computer program Programs are a set (series) of instructions Programmers determine The instructions.
Programming Languages 1.07a.  A computer program is a series of instructions that direct a computer to perform a certain task.  A programming language.
CMPE13Cyrus Bazeghi 1 Programming Languages Telling computers what to do.
Computer Concepts 2014 Chapter 12 Computer Programming.
Chapter 6 Programming Languages. © 2005 Pearson Addison-Wesley. All rights reserved 6-2 Chapter 6: Programming Languages 6.1 Historical Perspective 6.2.
1 Introduction Modules  Most computer programs solve much larger problem than the examples in last sessions.  The problem is more manageable and easy.
The Teacher Computing Computer Languages [Computing]
Computer Programs and Programming Languages What are low-level languages and high-level languages? High-level language Low-level language Machine-dependent.
CSC425 - Introduction To Computer Programming 1. 2 Generation Of Programming Languages A set of rules that telling a computer what to do. There are over.
INTRODUCTION TO COMPUTING CHAPTER NO. 04. Programming Languages Program Algorithms and Pseudo Code Properties and Advantages of Algorithms Flowchart (Symbols.
National Diploma Unit 4 Introduction to Software Development Introduction to Programming Languages.
CPS120: Introduction to Computer Science Lecture 14 Functions.
Module 4 Part 2 Introduction To Software Development : Programming & Languages Introduction To Software Development : Programming & Languages.
1 Programming Paradigms Object Orientated Programming Paradigm (OOP)
PROGRAMMING LANGUAGES
Chapter 8 High-Level Programming Languages. 2 Chapter Goals Describe the translation process and distinguish between assembly, compilation, interpretation,
Programming and Languages Dept. of Computer and Information Science IUPUI.
Course Instructor: Hira Farman Course : BY:HIRA FARMAN.
CONCEPTS OF PROGRAMMING LANGUAGES
Programming Models/ Paradigms Chapter 5: Programming Languages.
Introduction  Program: Set of sequence instruction that tell the computer what to do.  Software: A collection of programs, data, and information. 
Skill Area 311 Part B. Lecture Overview Assembly Code Assembler Format of Assembly Code Advantages Assembly Code Disadvantages Assembly Code High-Level.
A Short History of PL's (MacLennan 1999) “Zeroth Generation” (1940's-50's): machine language / assembly: if/then, read/write, store, goto
Software Design and Development Languages and Environments Computing Science.
Welcome to OBJECT ORIENTED PROGRAMMING Prepared By Prepared By : VINAY ALEXANDER PGT(CS) KV jhagrakhand.
 By the end of this lecture, you should …  Understand the three pillars of Object- Oriented Programming: Inheritance, Encapsulation and Polymorphism.
PROGRAMMING (1) LECTURE # 1 Programming and Languages: Telling the Computer What to Do.
OCR A Level F453: High level languages Programming techniques a. identify a variety of programming paradigms (low-level, object- oriented,
Computer Languages [Computing] Computing.
INTRODUCTION TO OBJECT-ORIENTED PROGRAMMING
OOP: Object-oriented programming
CSCI-235 Micro-Computer Applications
PROGRAMMING PARADIGMS
CS105 Introduction to Computer Concepts Intro to programming
CS285 Introduction - Visual Basic
Lecture 8 Programming Paradigm & Languages. Programming Languages The process of telling the computer what to do Also known as coding.
Tonga Institute of Higher Education IT 141: Information Systems
Programming Languages and Paradigms
Tonga Institute of Higher Education IT 141: Information Systems
CS105 Introduction to Computer Concepts Intro to programming
Presentation transcript:

Programming Paradigms Section 3.5 Programming Paradigms

Different Paradigms Paradigm means ways of programming. Low-Level Programming Paradigm Machine code (First Generation) Assembly Language (Second Generation) Use of mnemonics LDA X ADD Y STO Z Procedural Paradigm (Third Generation) High Level Language Problem Oriented  have an syntax FORTRAN (Formula Translation) and ALGOL (Agorithmic Language) developed for scientific and engineering purposes. BASIC is a teaching language. Visual Basic .net, sits inside the microsoft .net framework and is used for windows based applications

Different Paradigms With procedural languages it becomes difficult to reuse code or procedures in different programs. If the problem changes then changing the methods/procedures becomes cumbersome To solve this problem Object Oriented languages were developed. Object-Oriented Paradigm In these languages, the data and methods are coded and designed together as a single unit called the object. Accessing the object is only via the object’s methods. Once an object is working it cannot be corrupted by the programmer. The data values of an object is included in its definition. The values of the object or the internal working of the object can be changes without changing any methods. C++, java, smalltalk Procedural programming languages operate procedures on data structures. OOP languages they group the methods and the data structures together in an object.

Different Paradigms Declarative Programming languages: They encode a sequence of steps about how to solve a problem. The computer is told what the problem is not how to solve it. On the basis of the rules that are programmed it figures out how to solve the problem Expert systems. (use of knowledge base facts and databases)

Procedural programming language They solve problems in sequence of steps. Using sequence, selection and iteration. They are close enough to english (all high level languages are) They use procedures and functions. All steps are in a sequence. With procedures there is a risk of variables being altered as their scope is unclear.

oop With object oriented programming, we deal with objects which model the real world. Gives more data security as we now clearly define the scope of the variable. CAR is an object X’s car would be an instance of an object Y’s car would be another instance of CAR object. A car would have the same properties. A type of object can be made into a class. An object is an actual instance of class. Class is a type of object, which has its properties and definition. Objects are referenced with variable. X’s car.

Declarative programming language Where you tell the computer what needs to be solved but not how. Used for artificial language. Prolog. There is an inference engine, which holds the rules to manipulate the knowledge base which is the database containing the data. User inputs the query which is answered using the rules in the inference engine. Whatever happens in a procedural language using the selection and iteration statements, can be done without using these in declarative programming language.

Declarative programming language If there is a two dimensional array called Person in VB. We’ll have it like this. In VB if we want to search all males, what will we do? 1 2 Female Hermione Ginerva 3 Luna 4 Male Ron 5 Harry

Declarative programming language For index = 1 To 5 If Person[index, 1] = “Male” Then Msgbox(Person[index, 2]) End If However in declarative programming language we will not need to write any if conditions. Because we don’t need to tell the language how to find all the persons who are male in the array. All we have to do is to write the syntax for the query which in this case will be Male(X).

Structured program development In these structured programming languages we break the problem into smaller modules or structures. Breaking of a big problem into smaller problems is called stepwise refinement. Uses functions and procedures. Parameters are passed to both function and procedures. Procedures don’t return any values. Functions return values.

Structured program development In these structured programming languages we break the problem into smaller modules or structures. Breaking of a big problem into smaller problems is called stepwise refinement. Uses functions and procedures. Parameters are passed to both function and procedures. Procedures don’t return any values. Functions return values.