0% found this document useful (0 votes)
32 views74 pages

SD 4

Uploaded by

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

SD 4

Uploaded by

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

Software design with uml

UNIT IV - LOGICAL VIEW DESIGN DIAGRAMS


Contents
Transfer from Analysis to Design in the Characterization Stage: Interaction
Diagrams - Description of goal -Defining UML Method, Operation, Object
Interface, Class - Sequence Diagram - Finding objects from Flow of Events -
Describing the process of finding objects using a Sequence Diagram -
Describing the process of finding objects using a Collaboration Diagram –
Mapping use case to sequence diagram
The Static Structure Diagrams. -The Class Diagram Model - Attributes
descriptions - Operations descriptions - Connections descriptions in the Static
Model - Association, Generalization, Aggregation, Dependency, Interfacing,
Multiplicity- Case studies to implement in design lab.
Logical view
Software architecture description with 4+1 views
Transfer from Analysis to Design in the Characterization Stage
Interaction Diagrams
● Describes the interactions among the
different elements in the model.
● It is a part of dynamic behavior of the system.
● Represented in UML by two diagrams known
as Sequence diagram and Collaboration
diagram.
● Sequence diagram emphasizes on time
sequence of messages and collaboration
diagram emphasizes on the structural
organization of the objects that send and
Interaction Diagrams

shows how a set of objects accomplish the required


interactions with an actor

The set of steps, taken together, is called an interaction

Different types of communication:


method calls,
messages send over the network —These are all
referred to as messages.
Elements found in interaction diagrams

• Instances of classes
—Shown as boxes with the class and object identifier
underlined
• Actors
—Use the stick-person symbol as in use case diagrams
• Messages
—Shown as arrows from actor to object, or from object
to
object
Creating interaction diagrams

before starting to create an interaction


diagram, a class diagram and a use case
model need to be created.
Description of goal
used to capture and visualize the interactive behavior of a system
● To capture the dynamic behaviour of a system.
● To describe the message flow in the system.
● To describe the structural organization of the objects.
● To describe the interaction among objects.
● To model the flow of control by time sequence.
● To model the flow of control by structural organizations.
● For forward engineering (make or create an application according to
the given set of requirements - Reclamation) re-engineering process
● For reverse engineering. re-engineering process, creation is done
based on requirements acquired from the produced application or
changes/enhancements that are offered by the client/customer.
Defining UML Method,

Objects taking part in the interaction.


Message flows among the objects.
The sequence in which the messages are flowing.
Object organization.
Sequence Diagram
Example - order management system
The sequence diagram has four objects (Customer, Order, SpecialOrder and NormalOrder).
The message flow is nothing but a method call of an object.
sendOrder () – a method of Order object.
confirm () - a method of SpecialOrder object
Dispatch () - a method of SpecialOrder object.
Sequence Diagram
used to capture the order of messages flowing from one object to another.
Sequence Diagram
A sequence diagram shows the sequence of messages
exchanged by the set of objects performing a certain task
• The objects are arranged horizontally across the diagram.
• An actor that initiates the interaction is often shown on the left.
• The vertical dimension represents time.
• A vertical line, called a lifeline, is attached to each object or
actor.
• The lifeline becomes a broad box, called an activation box
during the live activation period.
• A message is represented as an arrow between activation boxes
of the sender and receiver.
—A message is labelled and can have an argument list and a
Sequence Diagram
Sequence Diagram
Sequence Diagram
Sequence Diagram
Sequence Diagram
Finding objects from Flow of Events

Write about the sequence diagram by own


Describing the process of finding objects using a Sequence
Diagram

iIdentify one control object per use case


Identify one control object per actor in the use case
The lifespan of a control object should cover the
extend of the use case or the extend of a user session
No well defined entry and exit conditions

The columns in the sequence diagram represents the


objects that participate in the use cases
Describing the process of finding objects using a
Collaboration Diagram
shows the object organization

the method call sequence is indicated by some numbering technique


The number indicates how the methods are called one after another

Example : order management system

the sequence diagram does not describe the object organization, whereas the
collaboration diagram shows the object organization.

To choose between these two diagrams, emphasis is placed on the type of


requirement.

If the time sequence is important, then the sequence diagram is used.


If organization is required, then collaboration diagram is used.
Collaboration Diagram

Model the system behavior


It captures the spatial ordering of messages
exchanged between objects during their lifetime
Similar to sequence diagram

Notations / Components

Objects
Actors
Links
Collaboration Diagram

Actors invoke and initiate use case

The link is an instance of association between object


and actors, A solid line
When to use collaboration diagram?

Best suited for analysing use cases

Each message contains a sequence number


Collaboration Diagram
Collaboration Diagram
Collaboration Diagram
Collaboration Diagram
Collaboration Diagram
Collaboration Diagram
Collaboration Diagram
Collaboration Diagram example
Mapping use case to sequence diagram

A sequence diagram ties use cases with objects. It


shows how the behavior of a use case is distributed
among its particular objects
Communicates with the users with use cases
It shows the missing components in the requirement
specification
Mapping use case to sequence diagram

The left most column is the actor who initiates the use
case
Horizontal arrows across columns represent
messages/stimuli that are sent from one object to the
other
Time proceeds vertically from the top to bottom

The activation is represented by a vertical rectangle


from which other messages can originate
Mapping use case to sequence diagram

Depicts lifetime of objects

<<Create>> - objects Created during the interactions


X - depicts that the instances are destroyed during the
interaction

The object cannot receive messages below the (cross


sign) X

Dashed line - represents the time span when the object


Mapping use case to sequence diagram
Mapping use case to sequence diagram

● The second column represents the boundary with which


the actor interacts
● The third column is a control object that manages the
remaining use cases.
● Acknowledgement after obtaining the clarification is
included
● Sequence diagram distributes the behavior of the use
case
● Assign responsibilities to each object in the form of a set
of operations
Mapping use case to sequence diagram

Remove redundancy by sharing operations across use


cases

Fragmenting bahavior causes unnecessary


complications in the requirement specification
Mapping use case to sequence diagram
The Static Structure Diagrams. -The Class Diagram Model - Attributes
descriptions - Operations descriptions - Connections descriptions in the Static
Model - Association, Generalization, Aggregation, Dependency, Interfacing,
Multiplicity- Case studies to implement in design lab.
Static Diagrams
Class and object diagram
Class diagram : shows the set of classes, interfaces
and collaborations and their relationships
Collection of vertices and arcs
Contains:
Classes
Interfaces
Collaborations
Dependency
Generalization
Association
Class diagram

Supports functional requirements of a system

Class diagrams are used to

Model the vocabulary of a system - Abstraction


Model simple collaborations - large system
Model logical database schema
Purpose of class diagram

Analysis and design


Describe responsibilities of a system
Base for component and deployment diagram
Forward and reverse engineering
Object diagram

Derived from the class diagram

Instance of the class diagram

Static

Snapshot of the system at a particular moment


Object diagram

Order management system

Objects

1. Customer
2. Order
3. Special order
4. Normal order

You might also like