Chapter 17

Questions for Chapter 16

1. Which symbol is used to start a UML 2.5 Activity Diagram?

image

A. a

B. b

C. c

D. d

E. e

F. f

2. Which action is guaranteed to be the last one to finish executing?

image

A. X1

B. X2

C. X3

D. X4

E. X5

F. There is no guaranteed “last” step to execute as the order is unpredictable

3. Which actions will never start?

image

A. None of the actions will start

B. Action1, Action2, and Action3

C. Action2 and Action3

D. Action0 and Action1

E. Action1

F. All actions start

4. Many of the Activity Diagram nodes or actions have matching inverses; e.g., we can match an Initial Node with an Activity Final Node. Which choice below does not have such an inverse?

A. Fork Node

B. Decision Node

C. Join Node

D. Send Signal Action

E. Wait Time Action

5. Which of the symbols below indicates a type of action?

A. image

B. image

C. image

D. image

E. image

6. An Activity has an Activity Final Node, with more than one incoming edge. When does the Activity finish?

A. The Activity finishes when all the incoming edges have supplied at least one token.

B. The Activity finishes when at least one incoming edge has supplied one token.

C. The Activity finishes when the majority of incoming edges have supplied at least one token.

D. The Activity finishes when at least one incoming edge has supplied one token and no token is moving in other parts of the diagram.

E. The Activity finishes when at least one incoming edge reaches a Flow Final Node, not an Activity Final Node.

7. Which of following Nodes may not be part of an Activity Diagram?

A. Activity Parameter Node

B. Control Node

C. Executable Node

D. Object Node

E. Sentinel Node

8. Examine the Activity Diagram fragment below. What sequence of behavior completions is not legal?

image

A. A1, A2

B. A1, A3, A2

C. A1, A3, A4, A2

D. A1, A2, A3, A4

E. The diagram is missing a join node and cannot finish.

9. Which action might never start?

image

A. X1

B. X2

C. X3

D. X4

E. X5

10. Which symbol, if reached, always indicates the end of execution of an Activity Diagram?

image

A. a

B. b

C. c

D. d

E. e

F. f

11. What statement is true about the diagram Exercise1 below?

image

A. It is an invalid diagram as it has multiple Initial Nodes.

B. It is an invalid diagram as it has multiple Activity Final Nodes.

C. It is an invalid diagram as it has two Actions with the same name.

D. It is a valid diagram.

12. The Chess game starts when two Players and the Referee shows up. Which diagram reflects that situation?

A. image

B. image

C. image

D. image

13. On an Activity Diagram, a diamond-shaped symbol appears. It has one edge going in and three edges leaving. What can we say about this symbol?

A. It is a decision node with a three-way decision.

B. It is a decision node with a four-way decision.

C. It is a merge node with a three-way decision.

D. It is a merge node, which merges three paths.

E. It is a fork node, which forks to three paths.

14. When discussing an Activity Diagram, what is a token?

A. A token is used to get you on a subway in some image cities.

B. A token is a small symbol that looks like a ball with an arrowhead.

C. A token represents an object or focus of control that traverses Activity Diagram edges or resides at a node.

D. A token represents a guard condition on an Activity Diagram.

15. Which diagram fragment conveys the modeler’s intent correctly?

A. image

B. image

C. image

D. image

16. Which of the following potential Activity Diagram model elements do not belong?

A. Activity Parameter

B. Object Node

C. Pin

D. Stored Query

Answers for Chapter 16

1. Which symbol is used to start a UML 2.5 Activity Diagram?

image

A. a

B. b

C. c

D. d

E. e

F. f

Discussion:

A—No. While it often used to indicate the start of thing, e.g., a path on a map, it has no use in UML.

B—Yes. The solid ball is used in both Activity Diagrams and State Machines Diagrams to indicate the start of execution, the start node. It is also called the InitialNode in an Activity Diagram.

C—No. This symbol indicates an Activity Final node. It ends all execution on the diagram.

D—No. This symbol indicates either a decision node or a merge mode. It is a decision node if there is only one input edge and several guarded output edges. It is a merge node if there are several input edges and only one output edge.

E—No. This symbol indicates a Flow Final Node. The Activity diagram kills all input tokens, but the rest of diagram may continue.

F—No. This symbol is not used in Activity Diagrams. In static diagrams, it would indicate namespace containment.

2. Which action is guaranteed to be the last one to finish executing?

image

A. X1

B. X2

C. X3

D. X4

E. X5

F. There is no guaranteed “last” step to execute as the order is unpredictable

Discussion:

D—This Activity Diagram has only one way to end, i.e., via the Activity Final node, ent. When the Activity Final node is reached, the diagram stops. The immediately preceding step, X4, must therefore be the last step to finish executing.

3. Which actions will never start?

image

A. None of the actions will start

B. Action1, Action2, and Action3

C. Action2 and Action3

D. Action0 and Action1

E. Action1

F. All actions start

Discussion:

A—Yes.

Action 0 would normally start after the control token from the Activity Start Node (the ball) reaches it. However, there is another token that is required. This token should arrive on the flow entering Action0 from the top. Unfortunately, this flow can only be populated with a token after Action0 finishes. This will never happen. It is a legal situation, but a logical impossibility, so Action0 cannot start. Action1 only follows after Action0 finishes, so Action1 cannot start either.

Action 2 and Action3 cannot start because there is no entering edge to Action2.

4. Many of the Activity Diagram nodes or actions have matching inverses, e.g., we can match an Initial Node with an Activity Final Node. Which choice below does not have such an inverse?

A. Fork Node

B. Decision Node

C. Join Node

D. Send Signal Action

E. Wait Time Action

Discussion:

A—No. A Fork Node matches up with the Join Node. They both use a solid bar (vertical or horizontal) as the notation.

B—No. A Decision Node matches up with a Merge Node. They both use a diamond as their notation.

C—No. A Join Node matches up with a Fork Node They both use a solid bar (vertical or horizontal) as the notation.

D—No. A Send Signal Action uses an outward-pointing (convex) pentagon. It matches with the Wait for Event Action, which uses an inward-pointing (concave) pentagon.

E—Yes. There is no match for a Wait Time Action. The notation for a Wait Time Action is two triangles oriented as an hourglass.

5. Which of the symbols below indicates a type of action?

A. image

B. image

C. image

D. image

E. image

Discussion:

A—No. This is a Decision Node, a type of control Node

B—No. This is a Fork Node, a type of control Node

C—Yes. This is a Wait for Time Event Node. It is a type of action

D—No. This is a Activity Final Node, a type of control Node

E—No. This is an Activity Node, a type of executable Node

6. An Activity has an Activity Final Node, with more than one incoming edge. When does the Activity finish?

A. The Activity finishes when all the incoming edges have supplied at least one token.

B. The Activity finishes when at least one incoming edge has supplied one token.

C. The Activity finishes when the majority of incoming edges have supplied at least one token.

D. The Activity finishes when at least one incoming edge has supplied one token and no token is moving in other parts of the diagram.

E. The Activity finishes when at least one incoming edge reaches a Flow Final Node, not an Activity Final Node.

Discussion:

B—Yes, the first token that reaches an Activity Final Node terminates the diagram. This is different from most other Nodes in Activity Diagrams, which requires all incoming edges to supply tokens.

A, C and D—No, only one token from one edge is sufficient.

E—No, a Flow Final Node can terminate a diagram if there are no other active tokens in the diagram. Only an Activity Final Node will always terminate a diagram when a token arrives.

7. Which of following Nodes may not be part of an Activity Diagram?

A. Activity Parameter Node

B. Control Node

C. Executable Node

D. Object Node

E. Sentinel Node

Discussion:

A—No. These are nodes where objects can enter the diagram.

B—No. Control Nodes include decision, fork, join, and merge Nodes.

C—No. Executable Nodes include Action and Activity Nodes.

D—No. Object Nodes hold data or objects as they pass through the diagram.

E—Yes. Sentinel Nodes are not part of UML. They are type of Lymph node that would be the first Lymph node to contain cancer cells and would therefore detect the cancer first.

8. Examine the Activity Diagram fragment below. What sequence of behavior completions is not legal?

image

A. A1, A2

B. A1, A3, A2

C. A1, A3, A4, A2

D. A1, A2, A3, A4

E. The diagram is missing a join node and cannot finish

Discussion:

The Activity Diagram will end with the activity final node is reached, which occurs after A2 finishes. All legal orders must end with A2. If A2 is fast, it is possible it would finish before A4 or A3 would finish.

9. Which action might never start?

image

A. X1

B. X2

C. X3

D. X4

E. X5

Discussion:

X1, X2, and X3 all start as soon as the Activity Diagram starts. As the Activity Diagram ends when X4 finishes, if X1 and X4 are quick or either X2 or X3 are slow, it’s possible that the Diagram will finish before X5 gets to start. Also, consider that the diagram formatting may mislead you to think that the columns finish concurrently.

10. Which symbol, if reached, always indicates the end of execution of an Activity Diagram?

image

A. a

B. b

C. c

D. d

E. e

F. f

Discussion:

A—No. While it often used to indicate the start of thing, e.g., a path on a map, it has no use in UML.

B—No. The solid ball is used in both Activity Diagrams and State Machines Diagrams to indicate the start of execution, the start node. It is called the Initial Node in an Activity Diagram.

C—Yes. This symbol indicates an Activity Final node. It ends all execution on the diagram.

D—No. This symbol indicates either a decision node or a merge mode. It is a decision node if there is only one input edge and several guarded output edges. It is a merge node if there are several input edges and only one output edge.

E—No. This symbol indicates a Flow Final Node. The node kills all input tokens, but the rest of diagram may continue.

F—No. This symbol is not used in Activity diagrams. In static diagrams, it would indicate namespace containment.

11. What statement is true about the diagram Exercise1 below?

image

A. It is an invalid diagram as it has multiple Initial Nodes.

B. It is an invalid diagram as it has multiple Activity Final Nodes.

C. It is an invalid diagram as it has two Actions with the same name.

D. It is a valid diagram.

Discussion:

A—Legal. Each Initial Node starts concurrently.

B—Legal. Whichever Activity Final Node is first reached ends the diagram.

C—Legal. Even though an Activity Diagram is a namespace, two actions with the same name are considered separate instances of the same action.

D—Correct. The diagram is legal.

12. The Chess game starts when two Players and the Referee show up. Which diagram reflects that situation?

A. image

B. image

C. image

D. image
On an Activity Diagram, a diamond-shaped symbol appears. It has one edge going in and three edges leaving. What can we say about this symbol?

Discussion:

A—No. The top line on this diagram starts with a Send Message, not a receive

B—No. This requires two Referees and one player

C—Yes. This requires two Players and one Referee

D—No. This uses the incorrect syntax for weight

13. On an Activity Diagram, a diamond-shaped symbol appears. It has one edge going in and three edges leaving. What can we say about this symbol?

A. It is a decision node with a three-way decision.

B. It is a decision node with a four-way decision.

C. It is a merge node with a three-way decision.

D. It is a merge node, which merges three paths.

E. It is a fork node, which forks to three paths.

Discussion:

A—Yes. A diamond on an Activity Diagram either is a decision or merge node. A decision node has one input edge and multiple output edges. If there are three outgoing edges, then there is a three-way possible decision to make. It is a decision node with a three-way decision.

14. When discussing an Activity Diagram, what is a token?

A. A token is used to get you on a subway in some cities.

B. A token is a small symbol that looks like a ball with an arrowhead.

C. A token represents an object or focus of control that traverses Activity Diagram edges or resides at a node.

D. A token represents a guard condition on an Activity Diagram.

Discussion:

C—Yes, A token conveys the control or the data being passed. It does not have a graphical representation.

15. Which diagram fragment conveys the modeler’s intent correctly?

A. image

B. image

C. image

D. image

Discussion:

A—Yes. These match the standard library borrowing and use the correct notation.

B—No. The constraints apply to the action, not to the edges.

C—No. The constraints are in the wrong order.

D—No. These are local conditions.

16. Which of the following potential Activity Diagram model elements do not belong?

A. Activity Parameter

B. Object Node

C. Pin

D. Stored Query

Discussion:

All but Stored Query are types of Object Nodes.

A—An Activity Parameter is an Object Node on the border of an Activity Diagram mapping to an input or output to the Activity.

B—An Object Node is the generic category.

C—A pin is a connection to an Object Edge, indicating an input or output to an action.

D—Yes. While a Stored Query may be a useful thing, it does not directly have any UML presence.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset