UML Weekend Crash Course™ - To Parent Directory

UML Weekend Crash Course™ - To Parent Directory UML Weekend Crash Course™ - To Parent Directory

crnarupa.singidunum.ac.rs
from crnarupa.singidunum.ac.rs More from this publisher
01.01.2015 Views

Answers to Part Reviews 321 26. It should express the purpose of the relationship (that is, why the objects are working together). 27. Use role names when a verb or verb phrase does not clearly express the relationship. Place the roles at each end of the association next to the type of object that plays the role. 28. A constraint is a rule that defines the conditions under which an object may participate in the relationship. 29. You most often spot the need for them in a many-to-many association. 30. Use a qualified association to simplify and to speed up the navigation across associations with a many-to-many multiplicity. Saturday Afternoon Review Answers 1. Single point of control: One of the objects in the relationship is the designated point of control for all communication with the set of objects. Function like a single object: The behavior of the set of objects associated by aggregation is coordinated through the aggregate (the single point of control) so the set of objects is managed and behaves like one big object. 2. Composition is a type of aggregation so it has all the properties of an aggregation association. It differs from aggregation in that the assembly object controls the creation and destruction of the member objects. So a member object cannot exist outside of the assembly. In aggregation, a part may be created outside the assembly and later added to the assembly or even removed and placed into storage or into another aggregate object. In composition, the part is created and dies within the assembly. 3. When the multiplicity on the aggregate end of the association is 1..1, it is safe to assume that the association is a composition type. In fact, some people don’t show the multiplicity on composition for this very reason. The 1..1 multiplicity means that the part must be associated with exactly one aggregate. The part object cannot exist without an associated assembly object. An aggregation relationship where the aggregate is required by the part defines a composition relationship. 4. Specialization examines the objects in a class to identify what makes them different from one another (using the five objective criteria). Generalization looks at objects in a number of subclasses to see what the objects have in common. The common properties are then isolated within a superclass. 5. A multiplicity of 0..1 says that the referenced type of object is optional, so the object on the other end of the association can exist without it. For example, an order can be placed even if there is no shipment for it. The shipment end of the association would be set to 0..1. A multiplicity of 1..1 says that the relationship is required. The object on the other end of the association cannot exist without the relationship. If the shipment end of the association was set to 1..1, then you could not place an order until you had a shipment ready. 6. Qualifiers provide the mechanism for reducing the number of objects that have to be accessed to find the specific desired object. They work much like keys in a database.

322 Appendix A 7. The pattern defines the materials needed to solve the problem and how to make them work together. But the implementation may be tailored to the specific type of application and the technology used for the implementation, not to mention the preferences of the developer for the peculiar needs of the application. 8. The pattern notation would indicate to everyone using the model that you have chosen to apply a standardized solution rather than a homegrown solution that would take more time to evaluate and approve because it has not been tested to the degree that a pattern has been tested. 9. The roles define the behavior of the participating objects much like job description or task assignments help clarify how members of a team will coordinate their efforts to finish the project. 10. The Class diagram models rules, but the Object diagram models facts. The facts may prove or disprove the accuracy of the rules, so the Object diagram is valuable for determining what the rules should be and whether the existing rules are accurate. 11. The object name may be similar to the name of an object of another type. Including the class name prevents misinterpretation of the diagram. 12. The Class diagram declares the rules that constrain the values that you can use in the attribute. The Object diagram records the actual value. The Class diagram defines all the rules about the information, whereas the Object diagram is used to model real examples or test cases. 13. An association defines the rules about how objects may be related to one another. Links identify how objects are related to one another. A link is to an association as an object is to a class. 14. Operations are only the declared part of behavior. The declaration would be the same for all objects of the same class, so including them in the Object diagram would be redundant. 15. Logical processes include workflows, Use Cases, and operations. The workflow describes when and how people will use the features of the system. The Use Case logic explains how the actors will interact with the system to accomplish one specific goal. Each operation describes the logic required to implement the behavior that the operation offers. 16. The diamond is used for decisions and as a merge point. The bar is used for initiating multiple threads or processes and for synchronizing multiple threads or processes. 17. Place a guard condition on the transition using text enclosed in square brackets [ ]. 18. No. You can have multiple transitions out of an activity, each labeled with a guard condition to show the direction to take based on the outcome of the activity. 19. False. An Activity diagram has one start but may have many end points. 20. There should be one end point for every termination option. But you can use a single end point for many transitions (that is, you can have many transition arrows point to the same end point). 21. If the completion of the activity results in criteria needed to make the decision, then use the activity itself. If the criteria are an explicit decision by the actor, or the accumulation of information from many previous activities, then use a decision diamond.

322<br />

Appendix A<br />

7. The pattern defines the materials needed to solve the problem and how to make<br />

them work together. But the implementation may be tailored to the specific type<br />

of application and the technology used for the implementation, not to mention<br />

the preferences of the developer for the peculiar needs of the application.<br />

8. The pattern notation would indicate to everyone using the model that you have<br />

chosen to apply a standardized solution rather than a homegrown solution that<br />

would take more time to evaluate and approve because it has not been tested to<br />

the degree that a pattern has been tested.<br />

9. The roles define the behavior of the participating objects much like job description<br />

or task assignments help clarify how members of a team will coordinate their<br />

efforts to finish the project.<br />

10. The Class diagram models rules, but the Object diagram models facts. The facts may<br />

prove or disprove the accuracy of the rules, so the Object diagram is valuable for<br />

determining what the rules should be and whether the existing rules are accurate.<br />

11. The object name may be similar to the name of an object of another type.<br />

Including the class name prevents misinterpretation of the diagram.<br />

12. The Class diagram declares the rules that constrain the values that you can use in<br />

the attribute. The Object diagram records the actual value. The Class diagram<br />

defines all the rules about the information, whereas the Object diagram is used to<br />

model real examples or test cases.<br />

13. An association defines the rules about how objects may be related to one another.<br />

Links identify how objects are related to one another. A link is to an association as<br />

an object is to a class.<br />

14. Operations are only the declared part of behavior. The declaration would be the<br />

same for all objects of the same class, so including them in the Object diagram<br />

would be redundant.<br />

15. Logical processes include workflows, Use Cases, and operations. The workflow<br />

describes when and how people will use the features of the system. The Use Case<br />

logic explains how the actors will interact with the system to accomplish one specific<br />

goal. Each operation describes the logic required to implement the behavior<br />

that the operation offers.<br />

16. The diamond is used for decisions and as a merge point. The bar is used for initiating<br />

multiple threads or processes and for synchronizing multiple threads or<br />

processes.<br />

17. Place a guard condition on the transition using text enclosed in square brackets [ ].<br />

18. No. You can have multiple transitions out of an activity, each labeled with a guard<br />

condition to show the direction to take based on the outcome of the activity.<br />

19. False. An Activity diagram has one start but may have many end points.<br />

20. There should be one end point for every termination option. But you can use a<br />

single end point for many transitions (that is, you can have many transition<br />

arrows point to the same end point).<br />

21. If the completion of the activity results in criteria needed to make the decision,<br />

then use the activity itself. If the criteria are an explicit decision by the actor, or<br />

the accumulation of information from many previous activities, then use a decision<br />

diamond.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!