UML Use Case Diagrams

Home Up Search Java 2 API C++ Resources

Use case diagrams are models of the interactions between the tasks a system performs and external entities that need those tasks performed.

Features to be found in use case diagrams:

  • Use Cases:  represent tasks that are performed by the system.   They represent the unified actions of whole collections of objects. 
  • Actors: represent the external entities that are interacting with the system.   This is usually the user(s), but may be other system(s).    When an actor has a relationship with a use case, it is said to be the "beneficiary" of that use case.
  • Collaborations: represent a cooperative relationship between a collection of entities that produces the tasks described by one or more use cases.   A collaboration essentially represents the implementation, as a whole, of the use case(s). 

 

Relationships in a use case diagram

  • Between Use Cases
    • Communications: represents when one use case communicates information with another.  Shown as a solid line with no arrowhead.
    • Generalization:  represents the relative difference in abstraction level between the two use cases.    This is akin to the notion of inheritance in classes.    One case is a more (or less) generalized version of the other.    Generalizations are represented by a solid line with a solid arrowhead. 
    • Dependencies (dotted line with arrowhead)
      • General: represents the situation when one use case possibly depends on another for completion of its task.   
      • Extends stereotype-- represents variant behavior of a use case.  That is, the child use case is variation of the parent use case and is applicable in a different situations than the parent.   The one case adds behavior to the other.  
      • Includes stereotype (aka "uses") -- represents a situation where one use case uses another use case in its entirety as part of its normal operation. 
  • Between Actors
    • Inheritance -- represents an "is a" relationship, which is an abstraction difference, just as in classes.  Shown as a solid line with a solid arrowhead.
    • Dependency: One actor depends on another to do something.  Shown as a dotted line with an arrowhead.
    • Communication: represents communication between actors.  Shown as a solid line with no arrowhead.
  • Between Actors and Use Cases
    • Communicates: represents the transfer of information between an actor and a use case.   This is the only way that an actor interacts with a use case.   Shown as a solid line with no arrowhead.
  • Between Collaborations and Use Cases
    • Dependencies (dotted lines with arrowheads)
      • General:  a composition is composed of the indicated use cases.
      • Realizes (stereotype): represents the notion that a collaboration performs ("realizes") the referenced use case(s).