Applying Sequence Diagrams - Quiz Explanation
The correct answers are indicated below, along with text that explains the correct answers.
1.
The scope of problem analysis requires the definition of
Please select the best answer.
A.
The operations and attributes for each resource
B.
The interactions between actors and use cases
C.
The purpose and interface of each resource
D.
The events and objects of the problem domain
The correct answer is C.
The scope of problem analysis requires the definition of the purpose and interface of each resource. A is incorrect because only operations and attributes that support the object interface will be included in problem analysis. An object may have other private functions and attributes that will be required during design. B is incorrect because the interactions are the means, not the end goal. D is incorrect because the events and objects are tools for finding and defining the interfaces. They are only suggested tools, not the only tools.
2.
The order of events in a sequence diagram is determined
Please select the best answer.
A.
By the sequence numbers of the events
B.
By the relative position of the events on the timeline
C.
By following the order of the events in the use case description
D.
By placing numbers in comments along the left-hand margin of the diagram
The correct answer is B.
The order of events in a sequence diagram is determined by the relative position of the events on the timeline. An event placed higher on the timeline takes place earlier than an event placed lower on the timeline. A is incorrect because sequence numbers are used in collaboration diagrams but are unnecessary in a sequence diagram. C is incorrect because the use case description is not needed. The timeline easily illustrates the order of events. D is incorrect because comments are not needed for sequencing. Position on the timeline is the definitive measure of the order of events.
3.
How much logic should a sequence diagram include?
Please select the best answer.
A.
One use case
B.
One user interaction
C.
One scenario
D.
One actor's use of the system
The correct answer is C.
A sequence diagram should model one scenario. This ensures that the logic remains simple and focused. A is incorrect because a use case may include complex decision logic that will quickly complicate a sequence diagram and make it unreadable. B is incorrect because one user interaction could potentially encompass more than one use case. A scenario is more precise measure of how much to include in a sequence diagram. D is incorrect because an actor may use many features of the system together and at different times. To model all the permutations would be far too complex.
4.
The first of the two steps in building the sequence diagram is to
Please select the best answer.
A.
Define the purpose and interfaces of the resource objects
B.
Define how the actor uses the system resources
C.
Define how the resource objects interact with the system
D.
Define how the actor interacts with the system in a use case
The correct answer is D.
The first of the two steps in building the sequence diagram is to define how the actor interacts with the system in a use case. A is incorrect because it describes the scope of problem analysis, not the first step in building a sequence diagram. Bis incorrect because the actors never really see the system resources. Once we define a system, the resources are encapsulated within it and are invisible to the external actors. C is incorrect because the resource objects are used by the system, not vice versa. Further, the resource objects do not get involved in the diagram until the second step.
5.
The second of the two steps in building the sequence diagram is to
Please select the best answer.
A.
Define how the system uses the problem domain resources
B.
Define how the actor uses the system resources
C.
Define how the resource objects interact with the system
D.
Define how the actor interacts with the system in a use case
The correct answer is A.
The second of the two steps in building the sequence diagram is to define how the system uses the problem domain resources.B is incorrect because the system resources are encapsulated within the system and are not visible to the actors. C is incorrect because resource objects do not typically interact with the system. In fact, the resource objects should be unaware of the context in which they are being used. D is incorrect because it describes the first step in the process.