UNIT3
UNIT3
1. What are System sequence diagram? What is the relationship between SSD and UseCase
?Explain with example.
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.
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.
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:
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.
1. Lifeline boxes
2. Activation
Activation boxes represent the time an object needs to complete a task.
3. Messages
4. Found Message
5. Lost Message
7. Self-Message
8. Create Message
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.
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.
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.
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.
6. Conditional Messages
The message is only sent if the clause evaluates to true.
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:
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
1.Initial State
A small filled circle followed by an arrow represents the initial action state or the start point for
any activity diagram.
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.
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.
An arrow pointing to a filled circle nested inside another circle represents the ending point.
Event
States
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.
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:
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:
Device Node
It represents the physical computing device having processor and memory. For example
Computer, Mobile Phone and so on.
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:
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)
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:
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.