Intro use case and use case diagram documentation
This presentation is the property of its rightful owner.
Sponsored Links
1 / 38

Intro: Use Case and Use Case Diagram Documentation PowerPoint PPT Presentation

  • Uploaded on
  • Presentation posted in: General

Intro: Use Case and Use Case Diagram Documentation. Use Case. A use case is a contract of an interaction between the system and an actor . Use Case Diagram: an integration of use cases. Use Case Diagram.

Download Presentation

Intro: Use Case and Use Case Diagram Documentation

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript

Intro use case and use case diagram documentation

Intro: Use Case and Use Case DiagramDocumentation

Use case

Use Case

A use case is a contract of an interaction between the system and an actor.

Use Case Diagram: an integration of use cases

Use case diagram

Use Case Diagram

A use case diagram illustrates a set of use cases for a system, the actors, and the interactions between actors and use cases.

A graphical overview of the functionality provided by a system in terms of actors, their goals (represented as use cases), and any dependencies between those use cases.

Use case diagram objectives

Use Case Diagram Objectives

  • Create a semi-formal model of the functional requirements

  • 2. Analyze and define:

    • Scope

    • External interfaces

    • Scenarios and reactions

What makes a good use case diagram

What makes a good Use Case Diagram?

Lack of ambiguity

- Each requirement must be interpreted in a single manner.


- The collection of all use cases is everything that can be done to/with the system.


- Requirements should not conflict with each other. If there are, tradeoffs must be detected and discussed.

Avoid design

- Requirements should raise a need, not answer it.

Construct a use case diagram

Construct a Use Case Diagram

Finding actors

Finding actors

  • External objects that produce/consume data:

    • Must serve as sources and destinations for data

    • Must be external to the system



External systems


Actor relationships generalization specialization

Actor Relationships – Generalization/Specialization

Define hierarchy for actors


The child actor inherits all use-cases associations

Should be used if (and only if), the specific actor has more responsibility than the generalized one (i.e., associated with more use-cases)

Association actor and use case

Association: Actor and Use Case

  • Solid line:

  • Interaction between actors and use case

  • Arrowhead (optional)

  • Control flow

  • Initial invocation, primary actor

Use case relationships

Use Case Relationships

  • Goal: enable flexibility in requirements specification

    • Isolating functionality

    • Enabling functionality sharing

    • Breaking functionality into manageable chunks

  • Relationships

    • Include

    • Extend

    • Generalization




Decomposing complicated behavior

Centralizing common behavior

the behavior of the included use case is inserted into the behavior of the including use case - The first use case often depends on the outcome of the included use case.



the behavior of the extension use case may be inserted in the extended use case under some conditions

Note the direction of the arrow

The base use-case does not know which use-case extends it



use case may have common behaviors, requirements, constraints, and assumptions with a more general use case.

Intro use case and use case diagram documentation

Example: Cellphone Company System

Hint - Actors: Phones, Phone Companies

Writing use cases

Writing Use Cases

  • Name:

  • Actors:

  • Descriptions:

    • Precondition

    • Main flow

    • Sub flow

    • Alternative flow



  • What the system needs to be true before running the use-case.

    • User account exists

    • User has enough money in her account

    • There is enough disk space

Main flow

Main flow

The success scenario is the main story-line of the use-case

• Assumption: everything is okay, no errors or problems occur, and it leads directly to the desired outcome of the use-case

• It is composed of a sequence of subflows


Step 1: Administrator enters course name, code and description (interaction)

Step 2: System validates course code

Step 3: System adds the course to the db and shows a confirmation message (interaction)

Intro use case and use case diagram documentation

Sub flow

  • Branches:

  • If the user has more than 10000$ in her account, the system presents a list of commercials

  • Otherwise…

  • Repeats:

  • User enters the name of the item he wishes to buy

  • System presents the items

  • User selects items to buy

  • Systems adds the item to the shopping cart

  • User repeats steps 1-4 until indicating he is done

Alternative flows

Alternative flows

  • Used to describe exceptional functionality

  • Examples:

    • Errors

    • Unusual or rare cases

    • Failures

    • Starting points

    • Endpoints

    • Shortcuts

Write include in user case

Write Include in User Case


Write exclude in use case

Write Exclude in Use Case

Extension Point

Intro use case and use case diagram documentation

Use Case sample

Intro use case and use case diagram documentation

Include Concept

Intro use case and use case diagram documentation

Extend Concept

Intro use case and use case diagram documentation

Generalization Concept

Effective use cases

Effective Use Cases

  • Only one side (system or actor) is doing something in a single step

  • • Write from an “objective” point of view using active tense

  • • Any step should lead to some progress

Effective use cases1

Effective Use Cases


“Get the amount form the user and give him the money”

“User click the enter key”

Intro use case and use case diagram documentation

Effective Use Cases – Common Mistakes

  • No actor

  • Too many user interface details “User types ID and password, clicks OK or hits Enter”

  • Very low goal details

    • User provides name

    • User provides address

    • User provides telephone number

From use case to use case diagrams

From Use-Case to Use-Case Diagrams

  • Top down ?

    Starting with an overview of the system, and then splitting Use-cases

  • Bottom up ?

    Starting with throwing all scenarios on the page, and then combining them:

    Most of the analysis process are actually combined

Common rules

Common Rules

  • Number Limit: The diagram should have between 3 to 10 base use-cases. No more than 15 use cases (base + included + extending).

    ---- If the dependency between two parts of a use-case is weak, they should be divided.

  • Abstraction: All use-cases should be in similar abstraction levels.

  • Size: Use cases should be described in half a page or more.

    - split using include/exclude

When we are done

When we are done

  • When every actor is specified.

  • When every functional requirement has a use-case which satisfies it.

  • A tractability matrix can help us determine it:

Use case and use case diagram a summary

Use Case and Use Case Diagram a Summary

  • When to use

  • What is Use Case and Use Case Diagram

  • How to Construct Use Case Diagram

  • How to Write Use Case

  • Questions?

  • Login