Flow Charts. Introduction A flowchart is a type of diagram that represents an algorithm or process....

12
Flow Charts

Transcript of Flow Charts. Introduction A flowchart is a type of diagram that represents an algorithm or process....

Page 1: Flow Charts. Introduction  A flowchart is a type of diagram that represents an algorithm or process.  Shows the steps as boxes of various kinds, and.

Flow Charts

Page 2: Flow Charts. Introduction  A flowchart is a type of diagram that represents an algorithm or process.  Shows the steps as boxes of various kinds, and.

Introduction

A flowchart is a type of diagram that represents an algorithm or process.

Shows the steps as boxes of various kinds, and their order with connecting arrows.

Flowcharts are used in analyzing, designing, documenting or managing a process or program in various fields.

Page 3: Flow Charts. Introduction  A flowchart is a type of diagram that represents an algorithm or process.  Shows the steps as boxes of various kinds, and.

The Beginning And The End

The start of a process is depicted by the following box type.

In PPT, this box is under Shape->Flow Chart->Terminator

The end of a process is depicted by the following box type.

In PPT, this box is under Shape->Flow Chart->Terminator

Note the same box shape is used for both start and stop.

Start

Stop

Page 4: Flow Charts. Introduction  A flowchart is a type of diagram that represents an algorithm or process.  Shows the steps as boxes of various kinds, and.

The Steps That Make The Process

Each step of a process is depicted by the following box type.

In PPT, this box is under Shape->Flow Chart->Process

All boxes are connected by arrows to show the process flow.

In PPT, the arrow is under Shape->Lines->Arrow

A Step

Start Step 1 Step 2 Stop

Page 5: Flow Charts. Introduction  A flowchart is a type of diagram that represents an algorithm or process.  Shows the steps as boxes of various kinds, and.

A Sample ProcessThe Georgia Gwinnett CollegeMath Sequence for Freshmanthrough College Algebra

Start

MATH 0099

MATH 1111

Stop

Page 6: Flow Charts. Introduction  A flowchart is a type of diagram that represents an algorithm or process.  Shows the steps as boxes of various kinds, and.

Decisions

In many situations a process may proceed with different steps depending on a question or decision.

A decision in a process is depicted by the following box type.

In PPT, this box is under Shape->Flow Chart->Decision

Each decision creates a branch allowing the process to continue in one of two different paths.

Is … ?

Path 1 Path 2

Page 7: Flow Charts. Introduction  A flowchart is a type of diagram that represents an algorithm or process.  Shows the steps as boxes of various kinds, and.

A Sample DecisionThe Compass Algebra Test may allow students to skip a math class.

Start

MATH 0099

MATH 1111

Stop

Is compass

score above 36?

No

Yes

Page 8: Flow Charts. Introduction  A flowchart is a type of diagram that represents an algorithm or process.  Shows the steps as boxes of various kinds, and.

Loops

In many situations a process needs to repeat certain steps multiple times. This is called a loop.

A decision is used to select when the loop should happen.

In PPT, the arrow with elbows is under Shape->Lines->Elbow Arrow Connector

Repeat?

Step

NoYes

Page 9: Flow Charts. Introduction  A flowchart is a type of diagram that represents an algorithm or process.  Shows the steps as boxes of various kinds, and.

A Sample LoopMost students will need a “C” or better to complete the GGC Freshman Math Sequence.

Start

MATH 0099

MATH 1111

Stop

Is compass score above

36?No

Yes

Is grade “C” or better?

Yes

No

Page 10: Flow Charts. Introduction  A flowchart is a type of diagram that represents an algorithm or process.  Shows the steps as boxes of various kinds, and.

Review of Symbols

Start Symbol: 1 arrow out Stop Symbol: 0 arrows out

Step Symbol: 1 arrow out

Decision Symbol: 2 arrows out

Question?

Step

No Yes

Start Stop

Page 11: Flow Charts. Introduction  A flowchart is a type of diagram that represents an algorithm or process.  Shows the steps as boxes of various kinds, and.

Blackjack ExerciseThe card game “Blackjack” requires the dealer to follow very specific rules for dealing cards to himself. He must deal one card face down, and then deal face up cards until his hand has a total score greater than 16. If his final score is greater than 21, then the dealer “busts”, else the dealer “stands”. Either way, his deal is complete.

Create a flow chart on the right hand side depicting the “dealer” process described above. Note, for this exercise, you do not need to know how a total score is calculated, simply include a step called “calculate score”.

Page 12: Flow Charts. Introduction  A flowchart is a type of diagram that represents an algorithm or process.  Shows the steps as boxes of various kinds, and.

Blackjack Solution

Remove fromStudent

Copy

Start

Deal Face Down Card

Deal Face Up Card

Stop

Is score greater than

16Yes

No

Is score greater than

21

BUST

Yes

STAND

No

Calculate Score