Structure Chart Chap 12
Structure Chart Chap 12
• A structure chart is a chart which shows the breakdown of a system to its lowest manageable parts.
• They are used in structured programming to arrange program module into a tree.
• Each module is represented by a box, which contains the module’s name and the parameters passed
to and from the modules are shown by arrows pointing towards the module receiving the parameter.
• The tree structure visualizes the relationships between modules, showing data transfer between
modules with using arrows.
• Each level of the structure chart is a refinement of the level above.
ADVANTAGES OF DIVIDING PROBLEM INTO SUB-
TASKS OR MODULES USING STRUCTURE CHARTS.
SYMBOLS OF SC
Key: Green Boxes are showing
different modules
EXAMPLE Temperature is the
parameter(input or output)
passing from one module and
going to other module
Level 0
Showing
SEQUENCE
statement
Level 1
STRUCTURE CHARTS SHOWING SELECTION
STRUCTURE CHARTS SHOWING
REPETITION/ITERATION
Condition
for iteration
STRUCTURE DIAGRAM MAY SHOW OR COMPRISES OF
THESE ELEMENTS/ FEATURES OF STRUCTURE DIAGRAM
• Modules
• Hierarchy of Modules
• Shows relationships of modules
• Parameters passed between modules
• Shows the module sequence, iteration(FOR..NEXT, REPEAT –UNTIL and While---END
WHILE) or selection (IF---THEN—ELSE—ENF IF, or CASE-----OTHERWISE---
ENDCASE)
FINITE STATE MACHINE (FSM)
• A finite state machine (FSM) is a mathematical model of a machine that can be in one of
a fixed set of possible states.
• One state is changed to another by an external input, this is called a transition.
• A diagram showing the behavior of an FSM is called a state-transition diagram.
HOW TO CONSTRUCT FSM