B Use Case Modelling

USE CASE MODELLING

  • Definition: Involves the use of use cases, relationships, and actors to analyze system functionality.

PURPOSE OF USE CASE MODEL

  • Objectives:

    • Develop the right system.

    • Ensure user requirements are met.

  • Use Case Modeling:

    • Effective technique for capturing and documenting user requirements.

USE CASE MODELLING PROCESS

  • Captures user requirements effectively.

  • Documented in both pictorial and textual formats.

CONCEPTS IN USE CASE MODELLING

  • Elements:

    • Use Case Diagram, Actor, Use Case, and Relationship.

USE CASE DIAGRAM

  • Composition:

    • Consists of use cases, actors, and relationships between them.

  • Purpose:

    • Visual representation of system functionalities.

    • Defines the scope of the system to be built.

EXAMPLE USE CASE DIAGRAM (BRANCH OFFICER)

  • Use Cases Involved:

    • Create Member

    • Delete Member

    • Renew Member

    • Rent Out Car

    • Manage Member Details

    • Print Log

    • Return Car

EXAMPLE USE CASE DIAGRAM (SYSTEM MONITOR)

  • Use Case Involved:

    • Print Reminder.

ACTOR TYPES

  • Users of the System:

    • Defined by their roles, e.g., not by names.

    • Examples include:

      • Branch Officer

      • Administrator

  • Other Systems:

    • Can interact with the system built.

  • Devices:

    • E.g., Camera, Barcode Scanner.

  • Time:

    • Time can also be considered an actor.

USE CASE

  • Represents a functionality from users’ perspectives.

  • Key Inquiry:

    • What information must the system maintain?

  • Examples of Use Cases:

    • Maintain rental limits, member information.

  • Naming Convention:

    • Use verb-noun format, e.g., "Rent Out Car."

USE CASE SPECIFICATION FORMAT

  • Components:

    • Flow of Events:

      • Expected Flow

      • Alternate Flow

      • Error Flow

    • Preconditions and Postconditions.

USE CASE SPECIFICATION EXAMPLE: Rent Out Car

  • Brief Description:

    • To allow branch officers to process rental transactions.

  • Actor:

    • Branch Officer

  • Preconditions:

    • Successful login; only members can rent cars.

  • Post Conditions:

    • Rented car becomes unavailable.

  • Expected Flow:

    • Begins when a member requests a rental.

  • Alternate Flow A1:

    • Invalid member identifier prompts an error.

  • Error Flow E1:

    • Credit system is inaccessible.

RELATIONSHIPS IN USE CASE MODELLING

  • Include Relationship:

    • A mandatory use case must be called by another use case when activated.

  • Extend Relationship:

    • An optional use case may be called by another use case when activated.

    • Direction of the arrow indicates the calling use case (unlike the "include" relationship).

  • Generalization Relationship:

    • Involves inheritances such as validating different IDs (member, car).

USE CASE DIAGRAM WITH INCLUDE + EXTEND

  • Use cases interconnected including:

    • Delete Member

    • Create Member

    • Branch Officer activities.

USE CASE DIAGRAM WITH GENERALIZATION

  • Illustration of Generalization:

    • Branch Officer interactions with various use cases including:

      • Delete Member

      • Renew Member

      • Validate Member ID, etc.