Week 6 Flashcards
In an object-oriented system, how is communication between objects achieved?
Communication is achieved via exchanging messages. These messages lead to operations.
What is a sequence diagram?
A sequence diagram is a diagram that shows how certain objects collaborate in a sequential behaviour.
What are lifeline elements in a sequence diagram?
Lifeline elements are the main components of a sequence diagram. They can be objects, roles, components, databases, or any components.
How do we showcase the focus of control in a sequence diagram?
We use activation bars to show which object has control at a point in time.
How do we represent a simple message in a sequence diagram?
In a sequence diagram, we represent a simple message with a line with a filled arrowhead.
How do we represent return messages in a sequence diagram?
We represent return messages in sequence diagrams with a dotted line with an empty arrowhead.
What must objects in sequence diagrams correspond to?
They must correspond to classes in class diagrams.
Can we have an object that does not correspond to any class?
No, we cannot.
What is a communication diagram?
A communication diagram is like a sequence diagram, only that the sequence is in the numbering of the messages. It models messages passed between objects or roles that deliver the functionalities of use cases and operations.
What is the difference between sequence and communication diagrams?
Sequence diagrams visualize the sequence of calls in a system and are used when time sequence is the main focus. Communication diagrams visualize the organization of objects and their interaction and are used when object organization is the main focus.
Sequence Diagram
▪ To visualize the sequence of
calls in a system that is used
to perform a specific
functionality.
▪ To represent the sequence of
messages that are flowing
from one object to another.
▪ Used when time sequence is
the main focus.
▪ Better suited for analysis
activities.
Communication Diagram
▪ To visualize the organization of
the objects and their
interaction.
▪ To represent the structural
organization of the system and
the messages that are sent and
received.
▪ Used when object organization
is the main focus.
▪ Better suited for depicting
simpler interactions of the
smaller number of objects.
This is just a reminder to go through the sequence diagram lecture in exercise
ok
test
test