Use Case Diagrams

A Use Case Diagram allows you to model the interactions between a user and a system. A Use Case consists of one or more scenarios, where a scenario is a sequence of steps taken when a user interacts with a system. The boundaries that define Use Cases and scenarios often blur, so you might say that a certain group of interactions form a single Use Case, but another person might group those interactions into more than one Use Case. Either approach is correct, because it is up to the modeller to use his or her discretion when deciding what forms a Use Case.

The notation for Use Cases is quite straightforward, as Figure A.1 shows.

Figure A.1. Use Case notation.


The actor is an individual or other system that interacts with the system. As you can see in Figure A.1, the actor carries out Use Cases. A single Use Case can have several actors or a single actor. Likewise, a single actor can perform several Use Cases.

The <<include>> notation avoids repetition, because it allows you to copy the behavior of one or more Use Cases. For example, a motor vehicle insurance company's system can allow an actor to get a price quote or make a claim. In both instances, a valuation is required for the Use Case. Figure A.2 shows the two Use Cases, including the valuation Use Case, thus avoiding repetition.

Figure A.2. The <<include>> notation.


The generalization notation that Figure A.1 shows allows you to describe a variation on the normal course of behaviour for a Use Case. For example, the price quote Use Case illustrated previously might have an alternative that the system uses if the proposed insured is classified as a high risk, perhaps because he or she is young. Figure A.3 shows the use of the generalization notation in this instance.

Figure A.3. The generalization notation.


A more rigid notation than the generalization notation is the <<extend>> notation. This illustrates a situation where a Use Case has the same functionality as another Use Case, but it extends or overrides parts of that functionality. To show this, you must list the items within the base Use Case that the extending Use Case can extend. In addition, if the extending Use Case does extend some of these items (it is not mandatory to extend every item on offer), you must place the names of these items in parentheses by the <<extend>> notation, as Figure A.4 illustrates.

Figure A.4. The <<extend>> notation.


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

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