0% found this document useful (0 votes)
8 views25 pages

UNIT3

The document provides an overview of various UML diagrams used for modeling dynamic aspects of systems, including system sequence diagrams, interaction diagrams, activity diagrams, state machine diagrams, component diagrams, deployment diagrams, and package diagrams. It explains the purpose, basic notations, and guidelines for creating these diagrams, along with examples to illustrate their use. The document emphasizes the importance of these diagrams in visualizing system interactions, workflows, and architecture.

Uploaded by

vedaraj
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views25 pages

UNIT3

The document provides an overview of various UML diagrams used for modeling dynamic aspects of systems, including system sequence diagrams, interaction diagrams, activity diagrams, state machine diagrams, component diagrams, deployment diagrams, and package diagrams. It explains the purpose, basic notations, and guidelines for creating these diagrams, along with examples to illustrate their use. The document emphasizes the importance of these diagrams in visualizing system interactions, workflows, and architecture.

Uploaded by

vedaraj
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 25

UNIT-III

Dynamic Diagrams – UML interaction diagrams – System sequence diagram – Collaboration


diagram – When to use Communication Diagrams – State machine diagram and Modeling –
When to use State Diagrams – Activity diagram – When to use activity diagrams Implementation
Diagrams – UML package diagram – When to use package diagrams – Component and
Deployment Diagrams – When to use Component and Deployment diagrams

1. What are System sequence diagram? What is the relationship between SSD and UseCase
?Explain with example.

System Sequence Diagrams

 Use cases describe how external actors interact with the software system. During this
interaction an actor generates system events to a system, usually requesting some system
operation to handle the event.
 A system sequence diagram (SSD) is a picture that shows, for a particular scenario
of a use case, the events that external actors generate their order, and inter-system
events.

A system sequence diagram should specify and show the following:

 External actors
 Messages invoked by these actors
 Return values associated with previous messages
 Indication of any loops or iteration area

Example of an SSD
Relationship between SSDs and Use Cases

Sequence diagram is used to represent one scenario of the use case .Hence it can be derived by
observing the use case.

How to Name System Events and Operations?

 Choose event and operation names at abstract level.


 Start the name of a system with verb such as add, enter, insert, make etc.

Example:

Guidelines
Following guideline is used while designing the SSD

 The sequence diagram generally represents only one scenario of use case model.
 System event must be represented at the abstract level.
 The system event must be usually a verb. For example display, enter, select, eject and so
on.
 The sequence diagram can represent the collaboration with other external systems.

2. Explain with an example, how interaction diagrams are used to model the dynamic
aspects of a system.

Interaction diagram:

Interaction diagram is used to show the interactive behavior of the system.

Two Types of Interaction Diagram

1. Sequence diagram
2. Collaboration diagram

1. Sequence diagram:

A Sequence diagram simply depicts interaction between objects in a sequential order i.e the
order in which these interactions take place.

Basic Notation used in sequence diagram

1. Lifeline boxes

A lifeline represents an individual participant in the Interaction

2. Activation
Activation boxes represent the time an object needs to complete a task.

3. Messages

Messages are arrows that represent communication between objects.

4. Found Message

A message sent from an unknown recipient

5. Lost Message

A message sent to an unknown recipient.

6. Reply or Return Message


A reply message is drawn with a dotted line.

7. Self-Message

A message sent from an object to itself.

8. Create Message

This is a message that creates a new object.


9. Synchronous Message

A synchronous message requires a response before the interaction can continue.

10. Asynchronous Message

Asynchronous messages don't need a reply for interaction to continue.

11. Object Destruction

The X at the bottom of an activation box indicates that the object has been removed.

12. Looping
Iteration or Loop is used to indicate certain operations will be executed ‘n’ number of times.

13. Conditional Messages

The message is only sent if the clause evaluates to true.

14.Mutually exclusive conditional messages

Mutually Exclusive Message indicates that either one of the messages can be passed based on the
condition.
Example:
2. Collaboration diagram

A collaboration diagram shows the objects and relationships involved in an interaction and the
sequence of messages exchanged among the objects during the interaction.

Basic notations in collaboration diagram

1. Link

A link is a connection path between two objects; it indicates navigation and visibility between
the objects.

2. Messages

Each message between objects is represented with a message expression and small arrow
indicating the direction of the message.

3. Messages to "self" or "this"


A message can be sent from an object to itself.

4. Creation of Instances

Any message can be used to create an instance. The create message may include parameters,
indicating the passing of initial values.

5. Message Number Sequencing

The number of message indicates the order of message within an interaction.

6. Conditional Messages
The message is only sent if the clause evaluates to true.

7. Mutually Exclusive Conditional Paths

Mutually Exclusive Message indicates that either one of the messages can be passed on the
condition.

8. Iteration or Looping
Iteration or Loop is used to indicate certain operations will be executed ‘n’ number of times.

Example:

3. Illustrate UML activity diagram with an example


Activity Diagram

 Activity diagram is basically a flowchart to represent the flow from one activity to
another activity.
 Activity diagram is used to describe the dynamic aspects of the system.

Purpose

 Draw the activity flow of a system.


 Describe the sequence from one activity to another.
 Describe the parallel, branched and concurrent flow of the system.

Basic notations in activity diagram

1.Initial State

A small filled circle followed by an arrow represents the initial action state or the start point for
any activity diagram.

2.Activity or Action State

An activity represents execution of an action on objects or by objects. We represent an activity


using a rectangle with rounded corners.

3.Action Flow

Action flows or Control flows are also referred to as paths and edges. They are used to show the
transition from one activity state to another.

4.Decisions and Branching

When we need to make a decision before deciding the flow of control, we use the decision node.
5.Guards

In UML, guards are a statement written next to a decision diamond that must be true before
moving to the next activity.

6.Fork

A fork node is used to split a single incoming flow into multiple concurrent flows.

7.Join

A join node joins multiple concurrent flows back into a single outgoing flow.

8.Merge
A diamond with several flows entering and one leaving.

9.Final State or End Point

An arrow pointing to a filled circle nested inside another circle represents the ending point.

When to use Activity diagram

 Visualize business processes and workflows.


 Model work flow by using activities.
 Model business requirements.
 High level understanding of the system functionalities.
 Investigate business requirements at a later stage.
Example:
Explain UML state machine diagram and modeling.

State machine diagram


 State machine diagram represents the events and states of object and the behavior of
object in reaction to an event.
 State chart diagram shows the life cycle of the object.

Events, states and Transitions

Event

An event is significant occurrence of something.

Example: Customer inserts ATM card.

States

A state is a condition of object at a particular moment of time.

Example: Waiting for user to enter PIN.

Transitions

The relationship between the two states is indicated using the transition.

Example: When the system operator performs startup the transition from idle state to active state
occurs.

Basic notations in state Diagram


More Notations

Guard:

A transition may be condition guard which represents the Boolean test .when the condition
results true then only further state change occurs.

Nested states:

States that contain other states known as Nested states.


Explain component, deployment and package diagram in detail.

Deployment diagram:
 Deployment diagram represents the physical architecture of the system.
 Deployment diagram shows
 Various hardware components called nodes. For example database server.
 Various software components called artifacts that run on each node. For example
web application, data base.
 Connection between various components. For Example –JDBC.

Node Notation

A node in UML is represented by a square box as shown in the following figure with a name. A
node represents the physical component of the system.

Types of Nodes:

There are two types of nodes used in deployment diagram.

Device Node

It represents the physical computing device having processor and memory. For example
Computer, Mobile Phone and so on.

Execution Environment Node(EEN)

This is a software computing resource which typically executes on device node.


Where to use Deployment Diagrams?

Usage of deployment diagrams can be described as follows:

 To model the hardware topology of a system.


 To model embedded system.
 To model hardware details for a client/server system.
 To model hardware details of a distributed application.
 Forward and reverse engineering.

Example: (credit Card processing system)


Component Diagram

 Component diagrams are used to model the physical aspect of the system.These physical
aspects are –executable files, libraries, documents and so on.
 Thus component diagram is used to visualize organization and relationship among the
components of the system.

Purpose:

• Visualize the components of a system.


• Construct executable by using forward and reverse engineering.
• Describe the organization and relationships of the components.

Basic Notations used in Component diagram

Component:

A component in UML is shown as below with a name inside. Additional elements can be added
wherever required.

Interfaces:

The behavior of the component is expressed in terms of the interfaces.one component can
provide or use the services of another component using the interfaces.

Subsystem:

Subsystem is a specialized case of component. The subsystem notation inherits all the rules of
the component notation element. The subsystem notation makes use of <<subsystem>>
stereotype.
Example: ( Recruitment System)

UML Package Diagram:

• Package diagram is used to represent the logical architecture of the system.


• It illustrates the layers, subsystem, and packages.
• Using UML package diagram, the elements of the system can be grouped together.
• UML packages can group anything, for instance classes, other packages, use cases and so
on.
• Packages can be nested. That means one package may contain other package.
• If the packages have some inner members then its name must be shown on the tab.
• The dependency line can be shown in the package diagram.it shows the dependent
packages.

Basic Notations used in Package diagram

Package:

A package is an organized group of elements. A package may contain structural things like
classes, components, and other packages in it.
Dependency line:

It shows the dependent Package. The dotted line with arrow head at one end is used to represent
the dependent packages.

Types of Layers:

There are three types of layer. They are

UI layer: This layer is created using the web pages or swing or applet classes.

Domain Layer: This layer consists of software objects for representing domain concepts.

Technical Service layer: For working of the higher layer object some services are required such
as maintaining error logs or accessing the database and so on.

You might also like