Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 11

Activity/ State Transition/ Flowchart

DIAGRAM
COMPARISION

By Ahmad Kabbara
& Mohamad Yaghmour
State-Based Diagram ?
 A state diagram is a type of diagram used
to describe the behavior of systems.
State diagrams require that the system
described is composed of a finite number
of states; sometimes, this is indeed the
case, while at other times this is a
reasonable abstraction. There are many
forms of state diagrams, which differ
slightly and have different semantics
Popular Types

 Activity Diagrams

 State Transition Diagrams

 Flowcharts
Comparison?
Activity diagrams are essentially elaborate
flowcharts, a more interesting
comparison is thus State Transition
diagrams and Flowcharts.
These two are often confused partly
because UML lumps activity graphs with
state machine packages, but differences
do exist
State Transition Diagrams
State transition diagrams have been used
right from the beginning in object-
oriented modeling. The basic idea is to
define a system that has a number of
states (hence the term finite state
machine). The machine receives events
from the outside world, and each event
can cause the machine to transition from
one state to another
Flowcharts
A flowchart is a type of diagram that represents
an algorithm or process, showing the steps as
boxes of various kinds, and their order by
connecting these with arrows. This
diagrammatic representation can give a step-
by-step solution to a given problem. Process
operations are represented in these boxes,
and arrows connecting them represent flow of
control. Flowcharts are used in analyzing,
designing, documenting or managing a
process or program in various fields.
The Difference?
Can you tell which is state and which is flow?
Spotting the Difference?
 A state machine performs actions in
response to explicit events. In contrast, the
flowchart does not need explicit events but
rather transitions from node to node in its
graph automatically upon completion of
activities
 A state machine is idle when it sits in a
state waiting for an event to occur. A
flowchart is busy executing activities when
it sits in a node.
See it yet?
Can you tell which is state and which is flow?
Notice that (a) does not progress until a condition is met? And that (b)
progresses regardless of condition and then takes decisions according to
condition

(a) State Transition (b) Flowchart


Diagram
Why is it important to know the
Difference?
The distinction between state machines and flowcharts is
important because these two concepts represent two
diametrically opposed programming paradigms: event-
driven programming (state diagrams) and structured
programming (flowcharts). You cannot devise effective
UML state machines without constantly thinking about
the available events. In contrast, events are only a
secondary concern (if at all) for flowcharts.

You might also like