chapter 7 Flashcards

1
Q

What is the primary purpose of a UML sequence diagram?

A
  • to model the dynamic interactions between objects during the execution of a single use case in a system.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

_______ Shows what messages (method calls) are sent between objects and when

A

sequence diagram

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Class diagrams were static, sequence diagrams are dynamic

A

t

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

The 2nd most used diagram next to class diagram is ________

A

UML diagram

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

CRC cards are to ________ while use cases are to _______

A
  • class diagrams
  • sequence diagrams
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

what are the Key parts of a Sequence diagram?

A

*participant
*message
*axes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

_______ is an object or entity that acts in the diagram

A

participant

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

_______ shows communication between
participant objects

A

message

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What do the axes in a sequence diagram represent?

A

– Horizontal: which object/participant
is acting

– Vertical: time (down = forward
in time)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is a sequence diagrams Purpose?

A

– 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 well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

how do we represent objects in a seq diagram?

A

in a rectangle
- <objectname> : <classname>
- Smith : Patient</classname></objectname>

  • :<classname>. - anonymous object
    </classname>
    • :Patient
  • <object>. - if class is unknown
    - Smith
    </object>
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

how do we represent Messages / Method calls between objects?

A
  • are indicated by arrow to other object
  • Method(arg1, arg2 …)
    • Admit( patientID, roomType )
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

explain types of arrow used in messages.

A
  • message is indicated by arrow to other object
    – dashed arrow back indicates return
  • d/t [ flat flow, procedure, async ]
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

an object created after the start of the scenario appears lower than the others

A

t

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

an X at bottom of object’s lifeline indicates ______

A

deletion

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

How does Java delete objects?

A

Java doesn’t explicitly delete objects; they fall out of scope and are garbage-collected

17
Q

What is activation of method calls?

A

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
18
Q

If one diagram is too large or refers to another we will indicate it with:

A

– an unfinished arrow and comment,
– or a “ref” frame that names the other diagram

19
Q

Why not just code Sequence diagrams?

A

– 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

20
Q

What is a Control Object

A
  • 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
21
Q

What are the relationships that Boundary, Entity, and Control elements must obey?

A
  1. Actors can only talk to boundary objects.
  2. Boundary objects can only talk to controllers and actors.
  3. Entity objects can only talk to controllers and boundary objects.
  4. Controllers can talk to boundary objects and entity objects, and to other controllers, but not to actors
22
Q

Which relationships are generally restricted or not permitted?

A
  1. Actors can only talk to boundary
    objects. [ every thing else is not allowed]
  2. Entity objects can communicate with an another Entity that it “owns” [ allowed with reservation ]
  3. Boundary objects can talk to certain Entity objects and other Boundary objects it
    “owns” [ allowed with reservation ]
  4. Controllers can talk to boundary objects and entity objects, and to other controllers, but not to actors
23
Q

______ Depicts data and behavior of a single object throughout its lifetime.

A

state diagram

24
Q

When to develop a state chart?

A
  • To Model objects that have change state in interesting ways
    [ transactions, stateful sessions,
    controllers, complex UI ….]
25
Q

Its Not useful to do state diagrams for every class in the system

A

t

26
Q

________ is conceptual description of the data in the object

A

state

27
Q

______ is movement from one state to another, indicated by an arrow

A

transition

28
Q

What are substates?

A

If there are states share common transitions and internal activities You can make them substates