Flowcharts

Program flowchart – shows a graphic form the algorithm, or method of solution, used to program.

A flowchart shows how the application is to be accomplished.

Aids in developing the logic of a program
Aids in breaking the program down into smaller units when the top-down or modular approach is used
A verification that all possible conditions have been considered in the program
A means of communicating with others (especially non-programmers) about the program
A guide in coding the program
A means of documenting the program

Four ways programmers begin designing programs:
1. Flowchart
2. storyboard
3. Psudocode
4. Toe chart

Different types of flowchart notation (8 basic symbols):

  1. Annotation – rectangle with only three sides (missing side toward left margin)
  2. Processes- Rectangle
  3. Input / Output - Parallelogram
  4. Decision - Rhombus
  5. Start / Stop – Terminal
  6. Predefined Process – hand draw, largest rectangle with an extra line on left and right
  7. Connector – smallest of given circles – only thing that goes in it is an uppercase letter
  8. Flowline -

(Use the same size symbols for all other times it is used in diagram!)
Do not use cursive writing on a flowchart

Start / Stop – Terminal Only START, STOP, END can go on a terminal symbol (must be uppercase)

Writing has to fit in the symbol

First make annotation symbol
Connect it to a terminal symbol with a dashed line going almost to the middle of the page
Dashed lines are only for connecting an annotation to a symbol and are only lines with no arrows.
Can be multiple pages

There is no exact length set for any arrow

There is 9 symbols related to System Design

  1. On-Line Display
  2. Manual Input
  3. Off-Line Storage
  4. Manual Operation
  5. Auxiliary Operation
  6. Core Storage
  7. Card Deck
  8. Card File
  9. Communication Link

There are 16 symbols related to System Designing and Programming

  1. Flowlines
  2. Processing
  3. Magnetic Tapes
  4. Documents / Reports
  5. Punched Cards
  6. General Input / Output
  7. Punched Paper Tape
  8. Annotation
  9. On-Line Storage
  10. Collate
  11. Magnetic Disk
  12. Sort
  13. Magnetic Drum
  14. Connector
  15. Merge
  16. Extract

Annotation Symbol
-Represents the addition of descriptive information, comments, or explanatory notes as clarification.
-All REM or Commented statements go in this symbol
-Always connected with a broken flowline
-Can go on either side but opening faces out

Processing Symbol
-represents the process of executing a defined operation of group of operations that results in a change of value, form, or location
-rectangle (arrow only comes in through middle of top and only exits through bottom)
Input / Output Symbol
-Represents an I/O function, which makes data available for process (input) or for displaying (output) of processed information
-READ, INPUT, PRINT Symbols

Decision Symbol
-Represents a decision that determines which number of alternative paths is to be followed
IF, SELECT CASE, DO…WHILE, FOR…NEXT Statements
False True
-Flow always comes in at the top vertex
-Flowline’s arrow has to touch the symbol, do not leave a gap!
Boolean Algebra deals with making decisions (true or false)
-TRUE or FALSE is written on the flow line
-A question goes in this symbol

Terminal Symbol
-Represents the beginning, the end, or a point of interruption or delay in a program
-STOP, RETURN, END Statements or START
Start is the only one where a flowline exits the symbol

Connector Symbol
-Represents any entry form, or exit to, another part of the flow chart. Also serves as an off-page connector. Use only a single uppercase letter inside the symbol.

Predefined Process Symbol
-Represents a named process consisting of one or more operations or program steps that are specified elsewhere.
GOSUB, CALL Statements

Flowlines
Flowlines are solid lines with arrows that indicate the direction of flow.
The process, input/output, decision, terminal connector, and predefined process symbols are connected with SOLID lines
The annotation is connected by a BROKEN line to any other symbol
-Flowlines never are squiggly and never cross each other but they can flow to another flow line

Fundamental Rules

  1. always start a flowchart with an annotation symbol in the top left corner of the page
  2. always use bank paper flow should be top to bottom or left to right
  3. arrows are used to indicate direction
  4. no curved or diagonal flowlines are allowed
  5. the first symbol next to an annotation symbol is the terminal symbol with “Start” written inside
  6. all writing is PRINTED, no cursive!
  7. flowlines should enter out the top-middle of a symbol
  8. flowlines should exit out the bottom-middle of a symbol
  9. the decision symbol has two possible exits from the symbol
  10. the exit flowlines of a decision symbol must be labeled with YES/NO or TRUE/FALSE
  11. when you run out of space at the bottom of a page, use a connector symbol
  12. place all lengthy algorithms into an annotation symbol
  13. there should be no more than 3-5 words in a symbol

Tips:
1 sketch a flowchart and the necessary detail flowchart before coding the problem
2 put yourself in the position of the reader, keeping in mind that the purpose of the flowchart is to improve communication between one person and another concerning the method of solution for the problem
3 show the flow of processing from top to bottom and from left to right. When in doubt, use arrowheads as required to indicate the direction of flow
4 draw the flowchart so that it is neat and clear
5 use connector symbol

No comments:

Post a Comment