Docsity

Use Cases - Java and the Web - Lecture Slides, Slides of Java Programming

Partial preview of the text

Download Use Cases - Java and the Web - Lecture Slides and more Slides Java Programming in PDF only on Docsity!

Use Cases

Define the Problem

  • The most critical question:
  • “Is this the right system to make?”

Use Cases are not Diagrams

  • Use Cases may have a diagram associated with them, and a use case diagram is an easy way for an analyst to discuss a process with a subject matter expert (SME).
  • But use cases are primarily text. The text is important. The diagram is optional.

Emphasize Goals

  • Investigating goals rather than tasks and procedures improves information gathering by focusing on the essence of requirements—the intent behind them.
  • Seeing requirements as identifying tasks to be done has a strong bias toward reproducing the existing system, even when it is being replaced because it is seriously defective.

Actors or Use Case First?

  • Because you have to understand each part of Use Cases, the parts are presented separately. But those who create use cases switch back and forth. The text describes use cases substantially before paying attention to actors. Typically, both actors and use cases are identified early and then examined to see if more use cases can be found from the actors, or more actors found by examining the use cases.

Identify Use Cases

  • Capture the specific ways of using the system as dialogues between an actor and the system.
  • Use cases are used to
    • Capture system requirements
    • Communicate with end users and Subject Matter Experts
    • Test the system

www.usecases.org Template

  • Name
  • Primary Actor
  • Scope
  • Level
  • Stakeholders and Interests
  • Minimal Guarantee
  • Success Guarantee
  • Main Success Scenario
  • Extensions
    • This is the basic format used in the text and in Alistair Cockburn’s Writing Effective Use Cases (Addison Wesley, 2000, ISBN 0201702258).
    • I prefer to modify it slightly to use the actor actions and system response in tabular form. Larman calls this the Two-Column Variation.

Optional Items

  • You can add some of the following items
    • Trigger (after Success Guarantee)
  • (at end:)
    • Special requirements
    • Technology and Data Variations
    • Frequency of Occurrence
    • Open Issues

Elements in the Preface

  • Only put items that are important to understand before reading the Main Success Scenario. These might include:
  • Name ( Always needed for identification )
  • Primary Actor
  • Stakeholders and Interests List
  • Preconditions
  • Success Conditions (Post Conditions)

Naming Use Cases

  • Must be a complete process from the viewpoint of the end user.
  • Usually in verb-object form, like Buy Pizza
  • Use enough detail to make it specific
  • Use active voice, not passive
  • From viewpoint of the actor, not the system

Golden Rule of Use-Case Names

  • Each use case should have a name that indicates what value (or goal) is achieved by the actor's interaction with the system
  • Here are some good questions to help you adhere to this rule: - Why would the actor initiate this interaction with the system? What goal does the actor have in mind when undertaking these actions? What value is achieved and for which actor? From Dr. Use Case (Leslee Probasco) in the Rational Edge, March, 2001

Use Case Name Examples

  • Excellent - Purchase Concert Ticket
  • Very Good - Purchase Concert Tickets
  • Good - Purchase Ticket (insufficient detail)
  • Fair - Ticket Purchase (passive)
  • Poor - Ticket Order (system view, not user)
  • Unacceptable - Pay for Ticket (procedure, not process)

Singular or Plural

  • This is usually determined by context.
  • There is a preference for the simplest form, but most common form can be better.
  • In the example of concert tickets, most people buy more than one, but a significant number buy only one.
  • At a supermarket, Buy Items would be best.
  • At a vending machine, it would be Buy Item.

Identify Actors

  • We cannot understand a system until we know who will use it - Direct users - Users responsible to operate and maintain it - External systems used by the system - External systems that interact with the system