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 319 20. I assume that the screen design offered by the user has been approved by all the users who will need to use it. The client assumes that I already know the laws that govern insurance terms for international shipping. 21. If you replicate the system, you have not fixed the problem that was the justification for the project. Saturday Morning Review Answers 1. A person may function in many roles. A person may perform many different functions and use the system in many different capacities when using a system. There really is no limitation other than the nature of the problem domain to restrict the possible number of roles that a person may play. The same person may even use the same Use Case from different roles. 2. Associations identify interactions between actors and Use Cases. Associations simply indicate that there is some sort of communication, no matter what that communication is. To get the details, you need to look at the Use Case narrative or one of the other models such as the Sequence or Collaboration diagrams. An association has no way of showing the data flowing between the two elements. 3. The dependency stereotype indicates delegation of part of a task to another Use Case. “Used” Use Cases are typically autonomous Use Cases that may also be referenced much like you would seek help from a friend. 4. The dependency stereotype indicates a conditional reference to a Use Case. During the execution of one Use Case, a condition may be encountered that requires access to a feature handled by another Use Case. When that condition is encountered, the extension is invoked. When the condition is not met, the extending Use Case is not invoked. 5. Generalization may be used to identify an existing actor or Use Case whose definition forms the basis for a more specialized actor or Use Case. 6. Few, if any, systems function in a void. Other systems, the business itself, and the people who use the system all influence how we interpret the role of the system and its value. 7. Identify the actors that interact with the Use Cases. In order to interact, they have to be aware of one another. An association defines who knows whom. 8. When the first Use Case must always (unconditionally) call on the second Use Case for help, model the relationship as a dependency with the stereotype. Draw the dependency arrow from the first Use Case to the second Use Case. 9. When the first Use Case only calls on the second Use Case for help because it encounters a pre-defined condition, model the relationship as a dependency with the stereotype. Draw the dependency arrow from the second Use Case to the first Use Case. 10. When two or more Use Cases share common properties, the common properties can be defined in a single Use Case. Then the two specialized Use Cases only have to define what they add to or override from the generalized Use Case. The same concept may be applied to common properties of actors.

320 Appendix A 11. We need to know how to start the Use Case. Do we simply say “start” as in selecting a menu option, or do we trigger an event Does the Use Case start because of time or because of a state within the system Sometimes the starting mechanism can tell us whether a Use Case should actually be more than one Use Case. 12. Both define conditions that must be true in order for the Use Case to work properly. But the Use Case takes on the responsibility for testing the condition defined in the preconditions, where it does not test the conditions defined in the assumptions. The Use Case literally assumes that another Use Case has satisfied the assumption prior to the execution of this Use Case. 13. The dialog is the conversation between the actor/Use Case and the system in the execution of the Use Case. It describes how they communicate with one another in order to complete the goal established for the Use Case. 14. They are defined separately mostly for visibility, to make certain that the dialog has addressed all the possible outcomes. We also define them separately because some termination options are difficult to describe in textual form (for example, concurrency options like canceling in the middle of an operation). 15. Typically, you only include what the user would be able to see during his interaction with the system. So you wouldn’t normally see things like saving items to the database, closing connections, and so on. But there are always exceptions. 16. A Use Case is a single goal that the system is expected to accomplish. A scenario is one possible way that the Use Case might execute when it attempts to accomplish the goal. 17. Scenarios help you define all the functional requirements for the execution of the Use Case. By doing so, they also provide the basis for a test plan to ensure that the Use Case can and does work exactly as expected. 18. The Use Case narrative and the Activity diagram illustrating the Use Case narrative can both be used. 19. Avoid redundancy. Isolate the unique segments of the logic into separate paths rather than repeat the same series of steps in multiple scenarios. Then to describe a complete scenario, simply combine and/or repeat the execution of individual test segments. 20. Use the scenarios as a guide to develop test cases. Taken together, the set of scenarios for all Use Cases in the system form the basis for your acceptance-level testing. 21. The Class diagram establishes the rules that govern the creation and use of objects. The Object diagram represents the facts about actual objects. Consequently, the Object diagram is a valuable tool for testing the accuracy and correctness of the Class diagram. 22. A constraint is a rule or set of rules that dictate the values that may be assigned to the attribute. 23. Constraints on an operation typically specify the logic or rules for the proper execution of the operation. 24. The name compartment includes the name of the class, optionally a stereotype, and optionally a set of properties (or constraints). 25. No. The UML allows you to show or hide as much or as little of the class notation as you need for the current problem you are working on, though typically you would always show at least the name compartment.

Answers to Part Reviews 319<br />

20. I assume that the screen design offered by the user has been approved by all the<br />

users who will need to use it. The client assumes that I already know the laws that<br />

govern insurance terms for international shipping.<br />

21. If you replicate the system, you have not fixed the problem that was the justification<br />

for the project.<br />

Saturday Morning Review Answers<br />

1. A person may function in many roles. A person may perform many different functions<br />

and use the system in many different capacities when using a system. There<br />

really is no limitation other than the nature of the problem domain to restrict the<br />

possible number of roles that a person may play. The same person may even use<br />

the same Use Case from different roles.<br />

2. Associations identify interactions between actors and Use Cases. Associations<br />

simply indicate that there is some sort of communication, no matter what that<br />

communication is. <strong>To</strong> get the details, you need to look at the Use Case narrative or<br />

one of the other models such as the Sequence or Collaboration diagrams. An association<br />

has no way of showing the data flowing between the two elements.<br />

3. The dependency stereotype indicates delegation of part of a task to<br />

another Use Case. “Used” Use Cases are typically autonomous Use Cases that may<br />

also be referenced much like you would seek help from a friend.<br />

4. The dependency stereotype indicates a conditional reference to a Use<br />

Case. During the execution of one Use Case, a condition may be encountered that<br />

requires access to a feature handled by another Use Case. When that condition is<br />

encountered, the extension is invoked. When the condition is not met, the<br />

extending Use Case is not invoked.<br />

5. Generalization may be used to identify an existing actor or Use Case whose definition<br />

forms the basis for a more specialized actor or Use Case.<br />

6. Few, if any, systems function in a void. Other systems, the business itself, and the<br />

people who use the system all influence how we interpret the role of the system<br />

and its value.<br />

7. Identify the actors that interact with the Use Cases. In order to interact, they have<br />

to be aware of one another. An association defines who knows whom.<br />

8. When the first Use Case must always (unconditionally) call on the second Use Case<br />

for help, model the relationship as a dependency with the stereotype.<br />

Draw the dependency arrow from the first Use Case to the second Use Case.<br />

9. When the first Use Case only calls on the second Use Case for help because it<br />

encounters a pre-defined condition, model the relationship as a dependency with<br />

the stereotype. Draw the dependency arrow from the second Use Case<br />

to the first Use Case.<br />

10. When two or more Use Cases share common properties, the common properties can<br />

be defined in a single Use Case. Then the two specialized Use Cases only have to<br />

define what they add to or override from the generalized Use Case. The same concept<br />

may be applied to common properties of actors.

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

Saved successfully!

Ooh no, something went wrong!