0% found this document useful (0 votes)
73 views

Experiment 6

The document describes state-chart diagrams and activity diagrams in UML. It explains that state-chart diagrams model the different states of an object and transitions between states caused by events, and are useful for modeling reactive systems. Activity diagrams are like flowcharts that show the flow and sequencing of activities in a system, including parallel, branched, and concurrent flows. The document provides an example state-chart diagram and activity diagram for an ATM system.

Uploaded by

Risha Singh
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
73 views

Experiment 6

The document describes state-chart diagrams and activity diagrams in UML. It explains that state-chart diagrams model the different states of an object and transitions between states caused by events, and are useful for modeling reactive systems. Activity diagrams are like flowcharts that show the flow and sequencing of activities in a system, including parallel, branched, and concurrent flows. The document provides an example state-chart diagram and activity diagram for an ATM system.

Uploaded by

Risha Singh
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

EXPERIMENT 6

Aim:- To draw the behavioural view diagram: State-chart diagram,


Activity diagram.
1)State-chart diagram
A State chart diagram describes a state machine. State machine can be defined as a machine which
defines different states of an object and these states are controlled by external or internal events. State
chart diagram is one of the five UML diagrams used to model the dynamic nature of a system. They
define different states of an object during its lifetime and these states are changed by events. State
chart diagrams are useful to model the reactive systems. Reactive systems can be defined as a system
that responds to external or internal events.
State chart diagram describes the flow of control from one state to another state. States are defined as a
condition in which an object exists and it changes when some event is triggered. The most important
purpose of State chart diagram is to model lifetime of an object from creation to termination. State
chart diagrams are also used for forward and reverse engineering of a system. However, the main
purpose is to model the reactive system.

Figure 6.1: State-chart Diagram of ATM


2. Activity Diagram
Activity diagram is another important diagram in UML to describe the dynamic aspects of the system.
Activity diagram is basically a flowchart to represent the flow from one activity to another activity.
The activity can be described as an operation of the system. The control flow is drawn from one
operation to another. This flow can be sequential, branched, or concurrent.
Activity diagrams deal with all type of flow control by using different elements such as fork, join, etc.
The basic purposes of activity diagrams is similar to other four diagrams. It captures the dynamic
behaviour of the system. Other four diagrams are used to show the message flow from one object to
another but activity diagram is used to show message flow from one activity to another.
Activity is a particular operation of the system. Activity diagrams are not only used for visualizing the
dynamic nature of a system, but they are also used to construct the executable system by using forward
and reverse engineering techniques. The only missing thing in the activity diagram is the message part.
It does not show any message flow from one activity to another. Activity diagram is sometimes
considered as the flowchart. Although the diagrams look like a flowchart, they are not. It shows
different flows such as parallel, branched, concurrent, and single.
The purpose of an activity diagram can be described as –
 Draw the activity flow of a system.
 Describe the sequence from one activity to another.
 Describe the parallel, branched and concurrent.
Activity diagrams are mainly used as a flowchart that consists of activities performed by the system.
Activity diagrams are not exactly flowcharts as they have some additional capabilities. These
additional capabilities include branching, parallel flow, swimlane, etc.
Before drawing an activity diagram, we must have a clear understanding about the elements used in
activity diagram. The main element of an activity diagram is the activity itself. An activity is a
function performed by the system. Activity diagrams are mainly used as a flowchart that consists of
activities performed by the system. Activity diagrams are not exactly flowcharts as they have some
additional capabilities. These additional capabilities include branching, parallel flow, swimlane, etc.
The basic usage of activity diagram is similar to other four UML diagrams. The specific usage is to
model the control flow from one activity to another. This control flow does not include messages.
Activity diagram is suitable for modelling the activity flow of the system. An application can have
multiple systems. Activity diagram also captures these systems and describes the flow from one
system to another. This specific usage is not available in other diagrams. These systems can be
database, external queues, or any other system. This diagram is used to model the activities which are
nothing but business requirements. The diagram has more impact on business understanding rather
than on implementation details.
Figure 6.2: Activity Diagram of ATM

You might also like