sduml unit 2
sduml unit 2
• In this system, the user first login to the system with user name and password. user
name of every user is unique.
• The user enters the word to the system for finding meaning of the word.
• The system searches the meaning for the given word.
• If the word is available on the database then the system retrieve and display the
meaning for the word otherwise it show the message box that contains please enter
correct word.
• 🡪 loose coupling
🡪 tight coupling
• Standard use case can NOT execute without the include case.
• In this system, the user first login to the system with user name and password. user
name of every user is unique.
• The user enters the word to the system for finding meaning of the word.
• The system searches the meaning for the given word.
• If the word is available on the database then the system retrieve and display the
meaning for the word otherwise it show the message box that contains please enter
correct word.
• 🡪 loose coupling
🡪 tight coupling
• Standard use case can NOT execute without the include case.
3/3/2025 44
UML Sequence Diagrams
• Used during requirements analysis
– To refine use case descriptions
– to find additional objects (“participating objects”)
• Used during system design
– to refine subsystem interfaces
• Classes are represented by columns
• Messages are represented by arrows
• Activations are represented by narrow rectangles
• Lifelines are represented by dashed lines
3/3/2025 47
Importance of Sequence Diagrams
• Depict object interactions in a given scenario identified for a given
Use Case
• Specify the messages passed between objects using horizontal
arrows including messages to/from external actors
• Time increases from Top to bottom
• Sequence diagrams are good at showing which objects communicate
with which other objects and what messages trigger those
communications.
• Sequence diagrams are not intended for showing complex procedural
logic..
3/3/2025 48
Sequence Diagram of sale scenario
P r o c e s s S a le S c e n a r io
: C a s h ie r :S y s te m
m a k e N e w S a le
S im p le c a s h - o n ly P r o c e s s S a le s c e n a r io :
lo o p [ m o r e it e m s ]
1 . C u s t o m e r a r r iv e s a t a P O S c h e c k o u t e n t e r I t e m ( it e m I D , q u a n t it y )
w it h g o o d s a n d / o r s e r v ic e s t o p u r c h a s e .
2 . C a s h ie r s t a r t s a n e w s a le .
3 . C a s h ie r e n t e r s it e m id e n t if ie r . d e s c r ip t io n , t o t a l
4 . S y s t e m r e c o r d s s a le lin e it e m a n d
p r e s e n t s it e m d e s c r ip t io n , p r ic e , a n d
r u n n in g t o t a l.
C a s h ie r r e p e a t s s t e p s 3 - 4 u n t il in d ic a t e s
done. e n d S a le
5 . S y s t e m p r e s e n t s t o t a l w it h t a x e s
c a lc u la t e d .
6 . C a s h ie r t e lls C u s t o m e r t h e t o t a l, a n d t o t a l w it h t a x e s
a s k s fo r p a y m e n t.
7 . C u s t o m e r p a y s a n d S y s t e m h a n d le s
p a y m e n t. m a k e P a y m e n t(a m o u n t)
...
c h a n g e d u e , r e c e ip t
3/3/2025 49
UML Sequence Diagrams
S.No Name Description Notation
3 Diagram Boundry
• Lost messages are those that are either sent but do not arrive at the
intended recipient, or which go to a recipient not shown on the current
diagram. Found messages are those that arrive from an unknown
sender, or from a sender not shown on the current diagram.
• They are denoted going
to or coming from an
endpoint element.
Interaction Semantics
Operator
alt Alternative fragment for mutual exclusion conditional logic
expressed in the guards.
loop Loop fragment while guard is true. Can also write loop(n) to
indicate looping n times.
opt Optional fragment that executes if guard is true.
region Critical region within which only one thread can run.
• The differences between timing diagram and sequence diagram are that the axes are
reversed so that the time are increase from left to right and the lifelines are shown in
separate compartments arranged vertically.
• Timing diagrams focus on conditions changing within and among lifelines along a
linear time axis.
3/3/20
87
25
Software Engineering and Project Management- UNIT II
Timing diagram
• The timing diagram
focusing attention
on time of occurrence of
events causing changes in
the modeled conditions
of the Lifelines.
3/3/20
89
25
Software Engineering and Project Management- UNIT II
Interaction overview diagram
• Interaction overview diagrams focuses on the overview of the flow of
control of the interactions.
• It is a variant of the Activity Diagram where the nodes are the
interactions or interaction occurrences.
• It describes the interactions where messages and lifelines are hidden.
3/3/2025 93
Software Engineering and Project Management- UNIT II
Interaction overview diagram