Professional Documents
Culture Documents
12-Object Oriented Design Concepts and Diagrams - Use Case - Class and Interaction Diagrams-27!02!2024
12-Object Oriented Design Concepts and Diagrams - Use Case - Class and Interaction Diagrams-27!02!2024
By
Dr. B.Kalaavathi
Interaction Diagrams
• UML Specifies a number of interaction
diagrams to model dynamic aspects of the
system
• Dynamic aspects of the system
Messages moving among objects/classes
Flow of control among objects
Sequences of events
Lower = Later!
Coming up: Components
Representing objects
• Squares with object type, optionally preceded
by object name and colon
write object's name if it clarifies the diagram
object's "life line" represented by dashed vert. line
Messages between objects
• message (method call) indicated by horizontal arrow
to other object
write message name and arguments above arrow
Messages, continued
• message (method call) indicated by horizontal
arrow to other object
dashed arrow back indicates return
different arrowheads for normal / concurrent
(asynchronous) methods
Diagonal Lines
:Student :Registration
System
Time=A GetDetails()
Time=B
Generic (unnamed)
Specific Generic
objects(unnamed)
Instance of an objects of class type Seminar
Object and Course
execution
lifeline
Method call
Return value
setActions(a, b, c)
setValues(a, 3, 4)
setValues(b, c, 7)
(committed)
destroy()
create()
destroy()
Synchronous message
Asynchronous message
Coming up: Components: Guards
Return message
• a synchronous message is used when the sender
waits for the receiver to process the message
and return before carrying on with another
message.
• An asynchronous message is used when the
message caller does not wait for the receiver to
process the message and return before sending
other messages to other objects within the
system.
Indicating method calls
• activation: thick box over object's life line; drawn
when object's method is on the stack
either that object is running its code, or it is on the stack
waiting for another object's method to finish
nest to indicate recursion
Activation
Nesting
Async Message Example
Synchronous message
Asynchronous message
Coming up: Components: Guards
Return message
Indicating selection and loops