UseCaseRequirements

Use Case-based Requirements

Introduction to Use Cases

  • Overview of documenting requirements using use cases.

  • Topics covered include:

    • Symbols in use case diagrams

    • Relationships between symbols

    • Textual description of use cases

Object-Oriented Programming Context

  • Use cases facilitate better documentation and discovery of classes needed in programming environments (e.g., Java, C++).

  • Documentation aids in design, testing, and user manual creation.

Introduction to UML (Unified Modeling Language)

  • UML provides a standardized way to visualize system design.

    • Types of UML diagrams include:

      • Use case diagrams for requirements

      • State diagrams for analysis

      • Class and sequence diagrams for design

  • Proficiency in UML is essential for effective collaboration in software development.


Scenario-based Requirements Elicitation

Scenarios

  • A scenario is a specific sequence of actions depicting behavior.

  • Illustrates how users interact with a system (e.g., Monopoly game example).

Scenario-based Approach

  • Used to gather and validate requirements through descriptive storytelling.

  • A complete set of scenarios represents all functionalities of the system.


Elements of a Use Case

Definition

  • Use case: A specification of action sequences involving system interactions with outside actors.

  • Scenarios are tied to common user goals, presenting measurable results for actors.

Use Cases Made Up of Scenarios

  • Multiple scenarios can be included in one use case demonstrating various pathways (successful and error conditions).

UML Symbols

  • Use case: represented by an oval.

  • Actors: represented as stick figures, indicating entities that interact with the system.

Identifying Actors

  • To identify actors, ask:

    • Who uses/install/maintain/shut down the system?

    • What information is exchanged?

Identifying Use Cases

  • Identify expected measurable outcomes actors seek from the system.


Use Case Diagrams and Relationships

Diagram Construction

  • Visual representation showing relationships among actors and use cases using UML conventions.

Relationships

  1. Communication: Default relationship, indicating interaction initiation.

  2. Include relationship: When one use case incorporates the functionality of another.

  3. Extend relationship: Provides variation or exception flows.


Use Case Flow-of-Events

Importance

  • Provides detailed procedure of a use case, focusing on what the system should do, detailed in a structured template.

Flow-of-Events Template Structure:

  • Preconditions: What must occur before use.

  • Main Flow: Steps involved in the use case performance.

  • Sub-flows: Breakdown of main flow for clarity.

  • Alternative Flows: Define reactions to errors or unusual conditions.


Misuse Cases

  • Misuse cases consider the perspective of hostile actors threatening system security.

  • Essential for planning security measures and identifying vulnerabilities.


Use Cases in Software Requirements Specification (SRS)

  • Use cases can replace traditional functional requirements in an SRS, aiding clarity and stakeholder understanding.

  • SRS includes traceability mapping for comprehensive requirements coverage.


Nonfunctional Requirements

  • Emphasize system performance, usability, and user interface effectiveness.


Summary of Practical Tips

  • Identify all system actors.

  • Gather comprehensive actor requested functionalities.

  • Reuse common functionalities through include relations.

  • Avoid complexity by minimizing use of extend relationships.

  • Use diagrams and flow descriptions for clearer requirements comprehension.

robot