Skip to content Skip to navigation

Connexions

You are here: Home » Content » Flowcharting

Navigation

Lenses

What is a lens?

Definition of a lens

Lenses

A lens is a custom view of the content in the repository. You can think of it as a fancy kind of list that will let you see content through the eyes of organizations and people you trust.

What is in a lens?

Lens makers point to materials (modules and collections), creating a guide that includes their own comments and descriptive tags about the content.

Who can create a lens?

Any individual member, a community, or a respected organization.

What are tags? tag icon

Tags are descriptors added by lens makers to help label content, attaching a vocabulary that is meaningful in the context of the lens.

This content is ...

Endorsed by Endorsed (What does "Endorsed by" mean?)

This content has been endorsed by the organizations listed. Click each link for a list of all content endorsed by the organization.
  • CCQ display tagshide tags

    This module is included in aLens by: Community College of QatarAs a part of collection: "Programming Fundamentals - A Modular Structured Approach using C++"

    Comments:

    "Used in the Computer Programming Fundamentals I course."

    Click the "CCQ" link to see all content they endorse.

    Click the tag icon tag icon to display tags associated with this content.

Affiliated with (What does "Affiliated with" mean?)

This content is either by members of the organizations listed or about topics related to the organizations listed. Click each link to see a list of all content affiliated with the organization.
  • OrangeGrove display tagshide tags

    This module is included inLens: Florida Orange Grove Textbooks
    By: Florida Orange GroveAs a part of collection: "Programming Fundamentals - A Modular Structured Approach using C++"

    Click the "OrangeGrove" link to see all content affiliated with them.

    Click the tag icon tag icon to display tags associated with this content.

  • Houston Community College display tagshide tags

    This module is included in aLens by: Houston Community CollegeAs a part of collection: "Programming Fundamentals - A Modular Structured Approach using C++"

    Comments:

    "COSC1436 Programming Funaamentals I"

    Click the "Houston Community College" link to see all content affiliated with them.

    Click the tag icon tag icon to display tags associated with this content.

  • Featured Content display tagshide tags

    This module is included inLens: Connexions Featured Content
    By: ConnexionsAs a part of collection: "Programming Fundamentals - A Modular Structured Approach using C++"

    Comments:

    "Programming Fundamentals - A Modular Structured Approach Using C++ is a new course written by Kenneth Leroy Busbee, a faculty member at Houston Community College. This text introduces students to […]"

    Click the "Featured Content" link to see all content affiliated with them.

    Click the tag icon tag icon to display tags associated with this content.

Also in these lenses

  • Busbee's Compter Science display tagshide tags

    This module is included inLens: Busbee's Computer Science Lens
    By: Kenneth Leroy BusbeeAs a part of collection: "Programming Fundamentals - A Modular Structured Approach using C++"

    Comments:

    "Texas Common Course Numbering: COSC1336 or COSC1436"

    Click the "Busbee's Compter Science" link to see all content selected in this lens.

    Click the tag icon tag icon to display tags associated with this content.

  • Lens for Engineering

    This module is included inLens: Lens for Engineering
    By: Sidney Burrus

    Click the "Lens for Engineering" link to see all content selected in this lens.

  • eScience, eResearch and Computational Problem Solving

    This module is included inLens: eScience, eResearch and Computational Problem Solving
    By: Jan E. OdegardAs a part of collection: "Programming Fundamentals - A Modular Structured Approach using C++"

    Click the "eScience, eResearch and Computational Problem Solving" link to see all content selected in this lens.

Recently Viewed

This feature requires Javascript to be enabled.

Tags

(What is a tag?)

These tags come from the endorsement, affiliation, and other lenses that include this content.
 

Flowcharting

Module by: Kenneth Leroy Busbee. E-mail the author

Summary: An introduction to flowcharting including the demonstration of functions and various control structures.

Flowcharting Symbols

Terminal

The rounded rectangles, or terminal points, indicate the flowchart's starting and ending points.

Figure 1
Figure 1 (graphics1.jpg)

Process

The rectangle depicts a process such as a mathematical computation, or a variable assignment.

Note: the C++ language equivalent is the statement.

Figure 2
Figure 2 (graphics2.jpg)

Input/Output

The parallelograms designate input or output operations.

Note: the C++ language equivalent is cin or cout.

Figure 3
Figure 3 (graphics3.jpg)

Connectors

Sometimes a flowchart is broken into two or more smaller flowcharts. This is usually done when a flowchart does not fit on a single page, or must be divided into sections. A connector symbol, which is a small circle with a letter or number inside it, allows you to connect two flowcharts on the same page. A connector symbol that looks like a pocket on a shirt, allows you to connect to a flowchart on a different page.

On-Page Connector

Figure 4
Figure 4 (graphics4.jpg)

Off-Page Connector

Figure 5
Figure 5 (graphics5.jpg)

Decision

The diamond is used to represent the true/false statement being tested in a decision symbol.

Figure 6
Figure 6 (graphics6.jpg)

Module Call

A program module is represented in a flowchart by rectangle with some lines to distinguish it from process symbol. Often programmers will make a distinction between program control and specific task modules as shown below.

Note: C++ equivalent is the function.

Local module: usually a program control function.

Figure 7
Figure 7 (graphics7.jpg)

Library module: usually a specific task function.

Figure 8
Figure 8 (graphics8.jpg)

Flow Lines

Note: The default flow is left to right and top to bottom (the same way you read English). To save time arrowheads are often only drawn when the flow lines go contrary the normal.

Figure 9
Figure 9 (graphics9.jpg)

Examples

We will demonstrate various flowcharting items by showing the flowchart for some pseudocode.

Functions

Example 1: pseudocode: Function with no parameter passing


Function clear monitor
  Pass In: nothing
  Direct the operating system to clear the monitor
  Pass Out: nothing
Endfunction 

Figure 10: Function clear monitor
Figure 10 (graphics10.jpg)

Example 2: pseudocode: Function main calling the clear monitor function


Function main
  Pass In: nothing
  Doing some lines of code
  Call: clear monitor
  Doing some lines of code
  Pass Out: value zero to the operating system
Endfunction 

Figure 11: Function main
Figure 11 (graphics11.jpg)

Sequence Control Structures

The next item is pseudocode for a simple temperature conversion program. This demonstrates the use of both the on-page and off-page connectors. It also illustrates the sequence control structure where nothing unusually happens. Just do one instruction after another in the sequence listed.

Example 3: pseudocode: Sequence control structure


Filename: Solution_Lab_04_Pseudocode.txt
Purpose:  Convert Temperature from Fahrenheit to Celsius
Author:   Ken Busbee; © 2008 Kenneth Leroy Busbee
Date:     Dec 24, 2008

Pseudocode = IPO Outline

input
  display a message asking user for the temperature in Fahrenheit
  get the temperature from the keyboard
processing
  calculate the Celsius by subtracting 32 from the Fahrenheit
  temperature then multiply the result by 5 then
  divide the result by 9. Round up or down to the whole number.
  HINT: Use 32.0 when subtracting to ensure floating-point accuracy.
output
  display the celsius with an appropriate message
  pause so the user can see the answer 

Figure 12: Sequence control structure
Figure 12 (graphics12.jpg)

Figure 13: Sequence control structured continued
Figure 13 (graphics13.jpg)

Selection Control Structures

Example 4: pseudocode: If then Else


If age > 17
  Display a message indicating you can vote.
Else
  Display a message indicating you can't vote.
Endif 

Figure 14: If then Else control structure
Figure 14 (graphics14.jpg)

Example 5: pseudocode: Case


Case of age
  0 to 17   Display "You can't vote."
  18 to 64  Display "Your in your working years."
  65 +      Display "You should be retired."
Endcase 

Figure 15: Case control structure
Figure 15 (graphics15.jpg)

Iteration (Repetition) Control Structures

Example 6: pseudocode: While


count assigned zero
While count < 5
  Display "I love computers!"
  Increment count
Endwhile 

Figure 16: While control structure
Figure 16 (graphics16.jpg)

Example 7: pseudocode: For


For x starts at 0, x < 5, increment x
  Display "Are we having fun?"
Endfor 

The for loop does not have a standard flowcharting method and you will find it done in different ways. The for loop as a counting loop can be flowcharted similar to the while loop as a counting loop.

Figure 17: For control structure
Figure 17 (graphics17.jpg)

Example 8: pseudocode: Do While


count assigned five
Do
  Display "Blast off is soon!"
  Decrement count
While count > zero 

Figure 18: Do While control structure
Figure 18 (graphics18.jpg)

Example 9: pseudocode: Repeat Until


count assigned five
Repeat
  Display "Blast off is soon!"
  Decrement count
Until count < one 

Figure 19: Repeat Until control structure
Figure 19 (graphics19.jpg)

Definitions

Definition 1: flowcharting
A programming design tool that uses graphical elements to visually depict the flow of logic within a function.
Definition 2: process symbol
A rectangle used in flowcharting for normal processes such as assignment.
Definition 3: input/output symbol
A parallelogram used in flowcharting for input/output interactions.
Definition 4: decision symbol
A diamond used in flowcharting for asking a question and making a decision.
Definition 5: flow lines
Lines (sometimes with arrows) that connect the various flowcharting symbols.

Content actions

Download module as:

PDF | EPUB (?)

What is an EPUB file?

EPUB is an electronic book format that can be read on a variety of mobile devices.

Downloading to a reading device

For detailed instructions on how to download this content's EPUB to your specific device, click the "(?)" link.

| More downloads ...

Add module to:

My Favorites (?)

'My Favorites' is a special kind of lens which you can use to bookmark modules and collections. 'My Favorites' can only be seen by you, and collections saved in 'My Favorites' can remember the last module you were on. You need an account to use 'My Favorites'.

| A lens I own (?)

Definition of a lens

Lenses

A lens is a custom view of the content in the repository. You can think of it as a fancy kind of list that will let you see content through the eyes of organizations and people you trust.

What is in a lens?

Lens makers point to materials (modules and collections), creating a guide that includes their own comments and descriptive tags about the content.

Who can create a lens?

Any individual member, a community, or a respected organization.

What are tags? tag icon

Tags are descriptors added by lens makers to help label content, attaching a vocabulary that is meaningful in the context of the lens.

| External bookmarks