23

In a use case diagram what is the difference between <<includes>>, <<extends>> and <<uses>>? Are <<includes>> and <<uses>> are the same thing?

Kev
  • 118,037
  • 53
  • 300
  • 385
SMUsamaShah
  • 7,677
  • 22
  • 88
  • 131
  • More detailed answers here: http://stackoverflow.com/questions/1696927/whats-is-the-difference-between-include-and-extend-in-use-case-diagram – Rap May 14 '12 at 17:03

4 Answers4

10

includes and uses are the same. From http://www.agilemodeling.com/essays/useCaseReuse.htm above

An include dependency, formerly known as a uses relationship in UML v1.2 and earlier

Guest
  • 101
  • 1
  • 2
8

Nice writeup here: http://www.agilemodeling.com/essays/useCaseReuse.htm

Summary from that article:

  • An extending use case continues the behavior of a base use case.
  • An include dependency is a generalization relationship denoting the inclusion of the behavior described by another use case. The best way to think of an include dependency is that it is the invocation of a use case by another one.
  • The inheriting use case would completely replace one or more of the courses of action of the inherited use case.
DwB
  • 37,124
  • 11
  • 56
  • 82
  • My question is since an included use case is a mandatory part of some use case, What is the purpose of depicting it. ? I simlply write the Main use case and will explain the included use case in the use case text(story). – Krishna Oza Feb 10 '14 at 11:29
  • 1
    You draw the included use case because you want to clearly point out that the included use case is not duplicate but is, instead, shared functionality. Duplicate being coded more than once, shared being coded once. – DwB Feb 10 '14 at 14:34
6

The include relationsionship is usually used in use cases to signify that one use case uses the other. In contrast the use relationship is used in UML to show dependencies between models, that one model requires the other in order to function.

Here are the quotes from IBM's documentation.

Include relationships
In UML modeling, an include relationship is a relationship in which one use case (the base use case) includes the functionality of another use case (the inclusion use case). The include relationship supports the reuse of functionality in a use case model.

Usage relationships
In UML modeling, a usage relationship is a type of dependency relationship in which one model element (the client) requires another model element (the supplier) for full implementation or operation.

To recap (as I understand it) includes is a dependency in the model while use is a dependency in the functionality.

Motti
  • 110,860
  • 49
  • 189
  • 262
4

"includes" and "uses" indicates the mandatory use case where as "extends" indicates the optional use case.

Krishna Oza
  • 1,390
  • 2
  • 25
  • 50