chapter 7 Flashcards
(28 cards)
What is the primary purpose of a UML sequence diagram?
- to model the dynamic interactions between objects during the execution of a single use case in a system.
_______ Shows what messages (method calls) are sent between objects and when
sequence diagram
Class diagrams were static, sequence diagrams are dynamic
t
The 2nd most used diagram next to class diagram is ________
UML diagram
CRC cards are to ________ while use cases are to _______
- class diagrams
- sequence diagrams
what are the Key parts of a Sequence diagram?
*participant
*message
*axes
_______ is an object or entity that acts in the diagram
participant
_______ shows communication between
participant objects
message
What do the axes in a sequence diagram represent?
– Horizontal: which object/participant
is acting
– Vertical: time (down = forward
in time)
What is a sequence diagrams Purpose?
– See if our class diagram can satisfy each step of the use case
- Identify more classes that we may have missed in class diagram
- Identify methods of those classes
how do we represent objects in a seq diagram?
in a rectangle
- <objectname> : <classname>
- Smith : Patient</classname></objectname>
- :<classname>. - anonymous object
</classname>- :Patient
- <object>. - if class is unknown
- Smith
</object>
how do we represent Messages / Method calls between objects?
- are indicated by arrow to other object
- Method(arg1, arg2 …)
- Admit( patientID, roomType )
explain types of arrow used in messages.
- message is indicated by arrow to other object
– dashed arrow back indicates return - d/t [ flat flow, procedure, async ]
an object created after the start of the scenario appears lower than the others
t
an X at bottom of object’s lifeline indicates ______
deletion
How does Java delete objects?
Java doesn’t explicitly delete objects; they fall out of scope and are garbage-collected
What is activation of method calls?
Thick box over object’s life line
- either that object is running its code
- or it is on the stack waiting for another object’s method to finish
If one diagram is too large or refers to another we will indicate it with:
– an unfinished arrow and comment,
– or a “ref” frame that names the other diagram
Why not just code Sequence diagrams?
– not all code is drawn on diagram
– sequence diagrams can be implemented in
many different languages
– non-coders can do sequence diagrams
– easier to do sequence diagrams as a team
– sequence diagrams provide more visual bandwidth
What is a Control Object
- Represents an entity or manager that makes decisions
(e.g. figures out what to do when a button is pressed) - In simple systems, this is usually the application itself
What are the relationships that Boundary, Entity, and Control elements must obey?
- Actors can only talk to boundary objects.
- Boundary objects can only talk to controllers and actors.
- Entity objects can only talk to controllers and boundary objects.
- Controllers can talk to boundary objects and entity objects, and to other controllers, but not to actors
Which relationships are generally restricted or not permitted?
- Actors can only talk to boundary
objects. [ every thing else is not allowed] - Entity objects can communicate with an another Entity that it “owns” [ allowed with reservation ]
- Boundary objects can talk to certain Entity objects and other Boundary objects it
“owns” [ allowed with reservation ] - Controllers can talk to boundary objects and entity objects, and to other controllers, but not to actors
______ Depicts data and behavior of a single object throughout its lifetime.
state diagram
When to develop a state chart?
- To Model objects that have change state in interesting ways
[ transactions, stateful sessions,
controllers, complex UI ….]