Top Banner
Using Flowcharts
10

Using Flowcharts. Sample Flowchart (without text) 2.

Dec 16, 2015

Download

Documents

Warren Harris
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Using Flowcharts. Sample Flowchart (without text) 2.

Using Flowcharts

Page 2: Using Flowcharts. Sample Flowchart (without text) 2.

Sample Flowchart (without text)

2

Page 3: Using Flowcharts. Sample Flowchart (without text) 2.

Terminator

Starts and ends a process

Only one flow, either departing or entering

START

STOP

3

Page 4: Using Flowcharts. Sample Flowchart (without text) 2.

Process

Contains calculation or process

Can contain a sequence of consecutive operations

Has a single flow entering and a single flow exiting

Calculate average Sum = A+B+C

Ave = Sum/3

4

Page 5: Using Flowcharts. Sample Flowchart (without text) 2.

Decision

Condition whose result causes one of multiple calculations or processes

Stated as question with only YES or NO as answer

One flow entering and two flows exiting

Is A > B?

Yes

No

5

Page 6: Using Flowcharts. Sample Flowchart (without text) 2.

Input/Output

Read input or write output

Only one operation, but can have multiple inputs or outputs

One flow entering and one flow exiting

Read A,B,C

6

Page 7: Using Flowcharts. Sample Flowchart (without text) 2.

Connector

Brings together separate flows that are coming together to perform the same operation

Multiple flows entering, one flow exiting

Note there is no “disconnector”

7

Page 8: Using Flowcharts. Sample Flowchart (without text) 2.

Let us try an example 8

We want to build a program to calculate the salary of a finical consultant

We need to read the working hours and hourly rate from the consultant

Calculation: Hours*Pay Rate

Output: the gross pay

Page 9: Using Flowcharts. Sample Flowchart (without text) 2.

Quiz : Draw Flowchart

Let’s write a flowchart to detail the process of a user logging into a computer account

What’s the first step? Determine input and output Input: userid and password Output: one of three situations:

Accepted

Incorrect userid

Incorrect password

Please use PowerPoint to finish this quiz and upload your answer to blackboard system.

9

Page 10: Using Flowcharts. Sample Flowchart (without text) 2.

So what are our steps?

INPUT userid and password CALL check of userid

DECISION: is userid valid? No, send message to user and exit

Yes, continue

CALL check of password, passing userid

DECISION: OK? No, send message to user and exit

Yes, send message of success and exit

10