Flow Control Analysis & Design Tool: Flowcharts

Slides:



Advertisements
Similar presentations
C Programming Technique – Firdaus-Harun.com
Advertisements

Representing an algorithm using Flowcharts
Introduction to Flowcharting
Introduction to Flowcharting
PSEUDOCODE & FLOW CHART
UNIT 2. Introduction to Computer Programming
Introduction to Flowcharting
Use Flowchart Symbols for Structured Programming
Introduction to Flowcharting A Supplement to Starting Out with C++, 4th Edition by Tony Gaddis Published by Addison-Wesley.
Subject: Information Technology Grade: 10
ME 142 Engineering Computation I Fundamentals of Procedural Computer Programming.
Java Planning our Programs Flowcharts Arithmetic Operators.
Chapter 1 Pseudocode & Flowcharts
LECTURE 1 CMSC 201. Overview Goal: Problem solving and algorithm development. Learn to program in Python. Algorithm - a set of unambiguous and ordered.
Flow Chart.
ITEC113 Algorithms and Programming Techniques
Chapter 2- Visual Basic Schneider
Flowcharts Remember that a solution to a problem is called an algorithm. Algorithms are often a series of steps required to solve the problem. A flowchart.
Developing logic (Examples on algorithm and flowchart)
The Program Design Phases
Review Algorithm Analysis Problem Solving Space Complexity
(C)opyright 2003 Scott/Jones Publishers Introduction to Flowcharting A Supplement to Starting Out with C++, 4th Edition by Tony Gaddis Scott/Jones Publishers.
Algorithm & Flowchart.
Chapter 1 Pseudocode & Flowcharts
CSC103: Introduction to Computer and Programming
DCT 1123 Problem Solving & Algorithms
Flow Charting. Goals Create Algorithms using Flow Charting procedures. Distinguish between Flow Charting and Pseudocode. Top-Down Design Bottom-up Design.
Pseudocode Demo for Payroll.c
C++ If….Else Statements and Flowcharts October 10, 2007.
1 Introduction to Flowcharting. 2 Writing a program Defining the problem –Write down what the program will do Planning –Write down the steps, draw a flowchart.
1 Introduction to Flowcharting. 2 Writing a program Defining the problem –Write down what the program will do Planning –Write down the steps, draw a flowchart.
CSE 102 Introduction to Computer Engineering What is an Algorithm?
Software Life Cycle What Requirements Gathering, Problem definition
ENGR-25_Programming-1.ppt 1 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods Bruce Mayer, PE Registered Electrical.
Lecture 2: Logical Problems with Choices. Problem Solving Before writing a program Have a thorough understanding of the problem Carefully plan an approach.
Flowcharts.
PSEUDOCODE C Programming Technique – Firdaus-Harun.com.
Flowcharts and Algorithms. Review of Terms  A computer is a machine that can represent and manipulate data –Ultimately the data and the instructions.
ITEC113 Algorithms and Programming Techniques
Structured Program Development Angela Chih-Wei Tang ( 唐 之 瑋 ) Department of Communication Engineering National Central University JhongLi, Taiwan 2010.
Program Design BUILDING A HOUSE. Steps to Designing a Program 1. Define the Output 2. Develop the logic to get that output 3. Write the program.
(C)opyright 2000 Scott/Jones Publishers Introduction to Flowcharting.
Fundamentals of Algorithms MCS - 2 Lecture # 5. Representation of Algorithms (continued) Flowcharts.
Topics: Selection Statements. Processing Involving Selecting Instructions An instruction that allows deviation and selection to take place uses the ‘IF’
1 Introduction to Flowcharting Computer Science Principles ASFA.
FLOWCHARTING AND ALGORITHMS
Learning Objective To be able to… Understand flow chart symbols Complete and correct flow chart algorithms Create a program based on a flow chart.
Flow Charts And Pseudo Codes Grade 12. An algorithm is a complete step-by- step procedure for solving a problem or accomplishing a task.
Problem Solving Flowcharts. Flowcharts Introduction  Flowcharts allow us to create a visual representation of a solution to a problem DRAW  With flowcharts,
CSE 110: Programming Language I Matin Saad Abdullah UB 404.
CSE 101 Lesson - 1 Number System & Program Design Sonia corraya (SOC)
Algorithm & Flowchart.
Introduction to Programming / chapter 3 / COM1022
Introduction to Flowcharting
Flowchart Symbols Terminal Process Input/ Output Decision
Programming Flowcharts
Computer Programming Flowchart.
Introduction to Flowcharting
ALGORITHM Basic CONCEPTS of Basic Concepts of Algorithm
Numbering System TODAY AND TOMORROW 11th Edition
Lecture 2: Logical Problems with Choices
Structured Program Design
Chapter 2- Visual Basic Schneider
Chapter 1 Pseudocode & Flowcharts
Faculty of Computer Science & Information System
Chapter 2- Visual Basic Schneider
ME 142 Engineering Computation I
Basic Concepts of Algorithm
Introduction to Programming
Introduction to Flowcharts
Presentation transcript:

Flow Control Analysis & Design Tool: Flowcharts Flowchart - a graphical way of writing algorithms Rectangle is used for calculations Parallelogram is used for input and output Circle is used as connector Diamond is used as decision Symbols are connected by arrows to represent the order of the operations

Flowcharts Symbols: Calculations Calculations (e.g. arithmetic expressions) are shown in rectangles Examples: Total = Cost + Tax Total = Cost + Tax Num = Num + 1 (add one to the current value of Num and make that the new value of Num) Num = Num + 1

Flowcharts Symbols: Input/Output Data input and output are shown in parallelograms Input means a read operation of data from a peripheral device to memory (e.g. a user typing in data at a keyboard) READ Num WRITE Num Output means a write operation of data to a peripheral device from memory (e.g. data displayed to the monitor)

Flowcharts Symbols: Decisions Decisions are shown within diamonds and specify a condition to be tested Based on the condition being TRUE or FALSE, the next operation will be determined Gross > 50000 Rate = 0.31 Rate = 0.28 True False A decision is composed of : A condition An operation to be done if condition is TRUE Possibly an operation to be done if condition is FALSE

Flowcharts Symbols: Start and End Every algorithm starts somewhere and terminates somewhere Every flowchart must have one start symbol and one end symbol Start and end symbols are ovals start square = num x num input num print square A start symbol denotes the start of the algorithm stop An end symbol indicates the algorithm has terminated

Sequential Algorithm Flowchart Allow1 = Age1 x Rate input Age1 start Print Allow1 stop prompt Age1 Allow2 = Age2 x Rate Print Allow2 input Age2 prompt Age2 Pseudocode Algorithm: PROMPT for Age of Child1 READ Age of Child1 PROMPT for Age of Child2 READ Age of Child2 CALCULATE Allowance for Child1 = Age of Child1 x Rate CALCULATE Allowance for Child2 = Age of Child2 x Rate DISPLAY Allowance for Child1 DISPLAY Allowance for Child2

Selection Algorithm Flowchart Allow = Age x YoungRate start Print Allow stop prompt Age Allow = Age x OlderRate Age < 10 FALSE TRUE input Age Previous Pseudocode Algorithm: PROMPT for Age READ Age IF Age less than 10 THEN CALCULATE Allowance = Age x YoungRate ELSE CALCULATE Allowance = Age x OlderRate DISPLAY Allowance

Looping Algorithm Flowchart start Display Total stop Read Age Calc Allowance KidsPaid < 3 FALSE TRUE KidsPaid = 0 Total = 0 Add Allowance to Total Increment KidsPaid Prompt Age Looping Algorithm Flowchart Previous Pseudocode Algorithm: Set KidsPaid to 0 Set Total to 0 WHILE KidsPaid < 3 DO PROMPT for Age READ Age CALCULATE Allowance = Age x Rate ADD Allowance to Total INCREMENT KidsPaid DISPLAY Total