14
Use case diagrams •A use case diagram is UML’s notation for showing the relationships among a set of use cases and actors • A use case diagram can help the software engineer to convey a high-level picture of the functionality of the system

Use case diagrams A use case diagram is UML’s notation for showing the relationships among a set of use cases and actors A use case diagram can help the

Embed Size (px)

Citation preview

Page 1: Use case diagrams A use case diagram is UML’s notation for showing the relationships among a set of use cases and actors A use case diagram can help the

Use case diagrams

• A use case diagram is UML’s notation for showing the relationships among a set of use cases and actors

• A use case diagram can help the software engineer to convey a high-level picture of the functionality of the system

Page 2: Use case diagrams A use case diagram is UML’s notation for showing the relationships among a set of use cases and actors A use case diagram can help the

Library system use case diagram

Example: Use-case diagram for a course registration system

Page 3: Use case diagrams A use case diagram is UML’s notation for showing the relationships among a set of use cases and actors A use case diagram can help the

Create Use Cases: Walk Through

1. Identify actors2. Define use cases3. Discover reuseable use cases4. Put uses into tables with id, name, primary actors etc.5. Write use case description for each use case• brief description• Basic flow• Alternative flow

Page 4: Use case diagrams A use case diagram is UML’s notation for showing the relationships among a set of use cases and actors A use case diagram can help the

Example

Page 5: Use case diagrams A use case diagram is UML’s notation for showing the relationships among a set of use cases and actors A use case diagram can help the

Identify Reuse In Use Case

Page 6: Use case diagrams A use case diagram is UML’s notation for showing the relationships among a set of use cases and actors A use case diagram can help the

Create use case index

Page 7: Use case diagrams A use case diagram is UML’s notation for showing the relationships among a set of use cases and actors A use case diagram can help the
Page 8: Use case diagrams A use case diagram is UML’s notation for showing the relationships among a set of use cases and actors A use case diagram can help the

Use case Description

Use Case Number: 1Use Case Name: Buyer Places a BidDescription: An EBAY buyer has identified an item they wish to buy, so they will place a bid for an item with the intent of winning the auction and paying for the item.

Page 9: Use case diagrams A use case diagram is UML’s notation for showing the relationships among a set of use cases and actors A use case diagram can help the

Basic Flow

Next Describe the happy day scenario for your use cases such as "placing a bid". For a consumer to play a successful bid, what is the primary flow when everything goes as planned. An effective use cases needs to have the basic flow before moving forward with writing the alternate flows.

Page 10: Use case diagrams A use case diagram is UML’s notation for showing the relationships among a set of use cases and actors A use case diagram can help the

Alternative flow

A few examples of alternate flows are:•credit card failed when a customer places an order, • user session times out when placing an order

Page 11: Use case diagrams A use case diagram is UML’s notation for showing the relationships among a set of use cases and actors A use case diagram can help the

Extensions

• Used to make optional interactions explicit or to handle exceptional cases

• By creating separate use case extensions, the description of the basic use case remains simple

• A use case extension must list all the steps from the beginning of the use case to the end– Including the handling of the unusual situation

Page 12: Use case diagrams A use case diagram is UML’s notation for showing the relationships among a set of use cases and actors A use case diagram can help the

Generalizations

• Much like superclasses in a class diagram• A generalized use case represents several

similar use cases• One or more specializations provides details

of the similar use cases

Page 13: Use case diagrams A use case diagram is UML’s notation for showing the relationships among a set of use cases and actors A use case diagram can help the

Inclusions

• Allow one to express commonality between several different use cases

• Are included in other use cases– Even very different use cases can share sequence

of actions– Enable you to avoid repeating details in multiple

use cases

Page 14: Use case diagrams A use case diagram is UML’s notation for showing the relationships among a set of use cases and actors A use case diagram can help the

Example of generalization, extension and inclusion

Example: Use-case diagram for a home security system