CSE 341 -- S. Tanimoto Paradigms 1 Paradigms Imperative Functional Object-Oriented Rule-Based Logic Visual* Scripting* * whether visual and scripting methodologies.

Slides:



Advertisements
Similar presentations
Programming Paradigms and languages
Advertisements

Chapter 8 High-Level Programming Languages. 8-2 Chapter Goals Describe the translation process and distinguish between assembly, compilation, interpretation,
Programming Languages Marjan Sirjani 2 2. Language Design Issues Design to Run efficiently : early languages Easy to write correctly : new languages.
Computers Are Your Future
CHAPTER 1: AN OVERVIEW OF COMPUTERS AND LOGIC. Objectives 2  Understand computer components and operations  Describe the steps involved in the programming.
ITEC113 Algorithms and Programming Techniques
1 CSE1301 Computer Programming: Lecture 15 Flowcharts and Debugging.
System Design and Analysis
Chapter 8: Introduction to High-level Language Programming Invitation to Computer Science, C++ Version, Third Edition.
CSE S. Tanimoto Syntax and Types 1 Representation, Syntax, Paradigms, Types Representation Formal Syntax Paradigms Data Types Type Inference.
ECIV 301 Programming & Graphics Numerical Methods for Engineers Lecture 3 Programming and Software.
1 CSE1301 Computer Programming: Lecture 15 Flowcharts, Testing and Debugging.
CS241 PASCAL I - Control Structures1 PASCAL I - Control Structures Philip Fees CS241.
Understanding the Mainline Logical Flow Through a Program (continued)
Guide To UNIX Using Linux Third Edition
Programming Logic and Design, Introductory, Fourth Edition1 Understanding Computer Components and Operations (continued) A program must be free of syntax.
Chapter 1 Program Design
Chapter 8: Introduction to High-level Language Programming Invitation to Computer Science, C++ Version, Third Edition.
Testing a program Remove syntax and link errors: Look at compiler comments where errors occurred and check program around these lines Run time errors:
Chapter 3 Planning Your Solution
PRE-PROGRAMMING PHASE
Chapter Seven Advanced Shell Programming. 2 Lesson A Developing a Fully Featured Program.
Introduction to Systems Analysis and Design Trisha Cummings.
CSE 341, S. Tanimoto Concepts 1- 1 Programming Language Concepts Formal Syntax Paradigms Data Types Polymorphism.
Systems Analysis – Analyzing Requirements.  Analyzing requirement stage identifies user information needs and new systems requirements  IS dev team.
High-Level Programming Languages: C++
CIS Computer Programming Logic
Implementation Considerations Yonglei Tao. Components of Coding Standards 2  File header  file location, version number, author, project, update history.
Programming.
Programming. What is a Program ? Sets of instructions that get the computer to do something Instructions are translated, eventually, to machine language.
PROGRAMMING IN VISUAL BASIC.NET VISUAL BASIC BUILDING BLOCKS Bilal Munir Mughal 1 Chapter-5.
Chapter 8 High-Level Programming Languages. 8-2 Chapter Goals Describe the translation process and distinguish between assembly, compilation, interpretation,
1 C++ Plus Data Structures Nell Dale Chapter 1 Software Engineering Principles Modified from the Slides made by Sylvia Sorkin, Community College of Baltimore.
CSC1201: Programming Language 2 Lecture 1 Level 2 Course Nouf Aljaffan Snd Term Nouf Aljaffan (C) CSC 1201 Course at KSU1.
Copyright © 2010 Certification Partners, LLC -- All Rights Reserved Perl Specialist.
CPS120: Introduction to Computer Science Decision Making in Programs.
Visual Basic Programming
ITEC113 Algorithms and Programming Techniques
I Power Higher Computing Software Development Development Languages and Environments.
PROGRAM DEVELOPMENT CYCLE. Problem Statement: Problem Statement help diagnose the situation so that your focus is on the problem, helpful tools at this.
8-1 Compilers Compiler A program that translates a high-level language program into machine code High-level languages provide a richer set of instructions.
Copyright © 2003 ProsoftTraining. All rights reserved. Perl Fundamentals.
CSE Winter 2008 Introduction to Program Verification January 15 tautology checking.
Fundamentals of Algorithms MCS - 2 Lecture # 5. Representation of Algorithms (continued) Flowcharts.
Copyright 2004 Scott/Jones Publishing Alternate Version of STARTING OUT WITH C++ 4 th Edition Chapter 6 Functions.
Recursion A recursive definition is one which uses the word or concept being defined in the definition itself Example: “A computer is a machine.
Problem-solving with Computers. 2Outline  Computer System  5 Steps for producing a computer program  Structured program and programming  3 types of.
FUNCTIONS. Midterm questions (1-10) review 1. Every line in a C program should end with a semicolon. 2. In C language lowercase letters are significant.
Embedding Assembly Code in C Programs תרגול 7 שילוב קוד אסמבלי בקוד C.
CMPSC 16 Problem Solving with Computers I Spring 2014 Instructor: Tevfik Bultan Lecture 4: Introduction to C: Control Flow.
Lecture 3: Developing Procedural Thinking (How to think like a programmer) B Burlingame 16 Feb 2016.
CS Class 04 Topics  Selection statement – IF  Expressions  More practice writing simple C++ programs Announcements  Read pages for next.
Program Design. Simple Program Design, Fourth Edition Chapter 1 2 Objectives In this chapter you will be able to: Describe the steps in the program development.
1 CSE1301 Computer Programming: Lecture 16 Flow Diagrams and Debugging.
Introduction to Problem Solving Programming is a problem solving activity. When you write a program, you are actually writing an instruction for the computer.
OCR A Level F453: High level languages Programming techniques a. identify a variety of programming paradigms (low-level, object- oriented,
Topic 4: Distributed Objects Dr. Ayman Srour Faculty of Applied Engineering and Urban Planning University of Palestine.
Structured Programming The Basics
1-1 Logic and Syntax A computer program is a solution to a problem.
Representation, Syntax, Paradigms, Types
Introduction to Systems Analysis and Design
Programming Right from the Start with Visual Basic .NET 1/e
Representation, Syntax, Paradigms, Types
CSC128 FUNDAMENTALS OF COMPUTER PROBLEM SOLVING
Chapter 2- Visual Basic Schneider
Representation, Syntax, Paradigms, Types
CSE S. Tanimoto Paradigms
Chapter 7 Using SQL in Applications
Chapter8: Statement-Level Control Structures April 9, 2019
Representation, Syntax, Paradigms, Types
Presentation transcript:

CSE S. Tanimoto Paradigms 1 Paradigms Imperative Functional Object-Oriented Rule-Based Logic Visual* Scripting* * whether visual and scripting methodologies are paradigms is debatable.

CSE S. Tanimoto Paradigms 2 Paradigm General style of thinking that underlies a programming language Webster’s New World Dictionary: “a pattern, example, or model”. ImperativeRule-based FunctionalLogic Object-orientedVisual data-flow Scripting

CSE S. Tanimoto Paradigms 3 The Imperative Paradigm An imperative program is a sequence of commands Read a value from a file. Evaluate an arithmetic expression. Assign a value to a variable. Test a condition and branch if it is true. Iterate a loop body until a condition is false. Print a value onto the screen.

CSE S. Tanimoto Paradigms 4 The Functional Paradigm An functional program is a collection of function definitions and function applications. Define SQR(x): { Apply the * function to x and x} Apply SQR to 7;

CSE S. Tanimoto Paradigms 5 The Object-Oriented Paradigm An object-oriented program is a collection of object class definitions, in which both data members and methods are specified. Class Student extends Person { int student_number; int get_student_number() { return student_number; } int set_student_number (int num) { student_number = num; }

CSE S. Tanimoto Paradigms 6 The Rule-Based Paradigm A rule-based program is a collection of if-then rules. if name = "" then input name; if name starts with "A" then print "Early in the alphabet";

CSE S. Tanimoto Paradigms 7 The Logic-Programming Paradigm A logic program is a collection of logical propositions and questions. If x is a bird or an airplane, then x has wings. Tweety is a bird. Does Tweety have wings?

CSE S. Tanimoto Paradigms 8 The Visual Data-Flow Paradigm A visual data-flow program is a diagram in which boxes represent operations and arrows indicate the flow of data from outputs of operations to inputs of other operations. input x * * * x 2 + 5x + 8

CSE S. Tanimoto Paradigms 9 The Scripting Paradigm* A script is a relatively small program that serves to direct activities of a system, typically by calling upon system services and programs written in other languages. Fetch input parameters from the environment. Authenticate the user against a username/password database. Issue a database query. Format the results as a web page. Print the web page to the standard output stream.

CSE S. Tanimoto Paradigms 10 Comparing Paradigms Imperative : actions can be broken down into sequences of commands. State of the computation may be very important in thinking about the program. Functional: the program can be specified in terms of a collection of input-output relationships. Rule-based: the computation is best described in terms of matching patterns in the data, and then taking appropriate actions for each pattern. Logic: the problem and solution can be described using mathematical logic.

CSE S. Tanimoto Paradigms 11 Comparing Paradigms (Cont) Object-oriented: the components of a system can be organized as objects -- really “agents” than encapsulate data and know how to perform methods on that data. Visual data-flow: the computation can be laid out as a network of processing stations with paths that carry data from one to another. Scripting: the problem is to control a collection of higher-level capabilities already written, possibly in other languages. Scripting is like glueing various services together to create new ones or automate a sequence of program invocations that would otherwise be done manually.

CSE S. Tanimoto Paradigms 12 Rapid Prototyping vs Product Development Rapid prototyping: full product specifications typically unavailable. Minor bugs may not be a problem. Programmer time is of the essence. Early semantic feedback emphasized above thorough error checking. High-level features (e.g., garbage collection, infinite-precision integers) that remove burdens from the programmer are prominent, even if they slow performance. Product development: product specification is complete or almost complete. Bugs will be highly embarrassing or worse. Compilers with strict type checking and the use of test protocols are prominent. Correct adherence to spec is very important, as is maintainability of code. Code optimization for performance is often an issue.