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):
- Annotation – rectangle with only three sides (missing side toward left margin)
- Processes- Rectangle
- Input / Output - Parallelogram
- Decision - Rhombus
- Start / Stop – Terminal
- Predefined Process – hand draw, largest rectangle with an extra line on left and right
- Connector – smallest of given circles – only thing that goes in it is an uppercase letter
- 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
- On-Line Display
- Manual Input
- Off-Line Storage
- Manual Operation
- Auxiliary Operation
- Core Storage
- Card Deck
- Card File
- Communication Link
There are 16 symbols related to System Designing and Programming
- Flowlines
- Processing
- Magnetic Tapes
- Documents / Reports
- Punched Cards
- General Input / Output
- Punched Paper Tape
- Annotation
- On-Line Storage
- Collate
- Magnetic Disk
- Sort
- Magnetic Drum
- Connector
- Merge
- 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
- always start a flowchart with an annotation symbol in the top left corner of the page
- always use bank paper flow should be top to bottom or left to right
- arrows are used to indicate direction
- no curved or diagonal flowlines are allowed
- the first symbol next to an annotation symbol is the terminal symbol with “Start” written inside
- all writing is PRINTED, no cursive!
- flowlines should enter out the top-middle of a symbol
- flowlines should exit out the bottom-middle of a symbol
- the decision symbol has two possible exits from the symbol
- the exit flowlines of a decision symbol must be labeled with YES/NO or TRUE/FALSE
- when you run out of space at the bottom of a page, use a connector symbol
- place all lengthy algorithms into an annotation symbol
- 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