Model Reconciliation - Quiz Explanation

The correct answers are indicated below, along with the text that explains the correct answers.
 
1. If you finish all the sequence diagrams and you find that a class is not represented in any of the scenarios, what should you do?
Please select the best answer.
  A. Delete the class from the class diagram because it is not needed.
  B. Ask the users how the resource is used. You may have missed a use case or a scenario, or it might be out of scope.
  C. Keep the class because it will probably be needed later and you do not want to lose any information that has been documented.
  D. Fix the sequence diagrams.
  The correct answer is B.
Ask the users how the resource is used. You may have missed a use case or a scenario, or it might be out of scope. The term became a class because someone included it in the problem statement or use cases and it ended up in the data dictionary. Find out as much as possible about the item before eliminating it from the model. A is incorrect because you should not delete anything until you can prove that it is not needed by verifying it with the users. C is incorrect because it should not remain in the model unless you can prove that it belongs. If you can prove that it should be removed, then be sure to place it on a list of items to be considered in later phases or by other projects. D is incorrect because you do not know that the sequence diagrams are in error. They might be correct, but a scenario may be missing so there is no corresponding diagram. Arbitrarily changing a sequence diagram just to include a stray class corrupts your model.

2. When you develop the sequence diagram, you sometimes find that a new event is needed to make the scenario work. What should you do?
Please select the best answer.
  A. Do not add the event, because the sequence diagram should stay in sync with the scenario used as the source.
  B. Do not add the event, because you have proceeded into a level of detail that is not appropriate for this phase of the project.
  C. Add the event and reconcile the change with the scenario to keep the two views in sync.
  D. Add the event to the sequence diagram only so that you can follow the evolution of the process from scenario to sequence diagram.
  The correct answer is C. Add the event and reconcile the change with the scenario to keep the two views in sync. Always keep the different views in sync. Differences are your clue that something is wrong and needs to be investigated. A is incorrect because the goal of modeling is to include everything needed to make the system work. The scenarios will almost never be complete in the first or even second pass. Each modeling pass will substantially enhance and refine your initial diagrams. In fact, that is your goal. B is incorrect for the same reason as A. The only exception would be if you were adding detail related to software or hardware requirements and not problem domain requirements only. Then you would step out of the scope of the phase. D is incorrect because you must keep the diagrams in sync with one another.

3. During the development of the class diagram, you will be asking the users some very detailed questions about the problem domain resources used to make classes. You are likely to discover new use cases or new scenarios. What should you do?
Please select the best answer.
  A. Add the new use cases and/or scenarios. Add the classes. Add the corresponding interaction diagrams for each new scenario. Reconcile all the diagrams.
  B. Add the new classes if the new use cases and/or scenarios justify the need for them in the scope of this project. Put the new resources definitions into the data dictionary.
  C. Add the classes and update the data dictionary using the use cases and/or scenarios to determine the resource definition.
  D. Add the scenarios and update or create corresponding sequence diagrams.
  The correct answer is A. Add the new use cases and/or scenarios. Add the classes. Add the corresponding interaction diagrams for each new scenario. Reconcile all the diagrams. Each change to one diagram should result in a complete reconciliation of all the models. B is incorrect because the class diagram and data dictionary would not be reconciled with the use cases and interaction diagrams. C is incorrect because it recognizes part of the value of the use cases as a source for the definition of the class, but it leaves out the interaction diagrams used to identify and define the class interfaces. D is incorrect because it does not add the new classes or complete the reconciliation between the sequence diagrams and the class diagram.

4. When you define the events in the sequence diagram, you have to draw the event from a sending object to a receiving object. What do you do if there is no direct association between the classes that these objects belong to?
Please select the best answer.
  A. Sequence diagrams define only the required interfaces on the destination object, so they do not have to include the complete path to the object.
  B. Add an association between the two corresponding classes so that the two objects can communicate directly.
  C. Find another object to handle the event because the object you picked is not available to receive the event.
  D. Refer to the class diagram to identify the path that the communication must follow. Add the intervening objects to the sequence of events.
  The correct answer is D. Refer to the class diagram to identify the path that the communication must follow. Add the intervening objects to the sequence of events. Links are like phone lines. As long as there is an unbroken connection from one object to the other, the two can talk. But you have to follow the line of communication from the source to the destination with no breaks. A is incorrect because the sequence diagram must show how the message gets from one object to the other. If there are no links, then the communication cannot get through. B is incorrect because the associations must reflect functional relationships that are part of the class's definition. During design, you will learn how to improve performance by defining shortcuts. But during problem analysis, the associations define what the entity is, not the software performance requirements. C is incorrect because the destination object should be selected based on its purpose, not on whether or not a direct association is available.

5. Events become operations. Operations include input arguments and return values. What do you do when the sending object does not own the argument values it uses in the event?
Please select the best answer.
  A. Find the object(s) that own the values. Move the attributes from those objects to the one that needs them for the event.
  B. Find the object(s) that own the values. Provide the events needed to obtain the values. Add the new object(s) and the new event(s) to the sequence diagram.
  C. Add the attributes to the sending object so that they are accessible when the object needs to send the event.
  D. Move the responsibility for sending the event to the object that owns the attribute values.
  The correct answer is B. Find the object(s) that own the values. Provide the events needed to obtain the values. Add the new object(s) and the new event(s) to the sequence diagram. A is incorrect because attributes should be assigned to classes based on the class responsibility, not based on whoever might need to use the information. In fact, many objects may use the values, but only one object should own them. C is incorrect because this would result in replication of the attributes in every object that uses the values. Only one object should own the values. Other objects may simply ask for them if and when they are needed. D is incorrect: Owning the values of an argument and owning responsibility for a task are two very different responsibilities and should not arbitrarily be combined. In fact, an event may use values from many different objects. Using this logic, you would place the responsibility for sending the event in all the objects that own the values.