views:

38

answers:

2

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

+1  A: 

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's a quote 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
what i understood is that `<<uses>>` is used between any usecase that is used, while `<<includes>>` is a so called sub-usecase of a usecase. Right?
LifeH2O
@LifeH2O, I think so.
Motti
Well this is expected project presentation exam question, hope my teacher get it right :)
LifeH2O
A: 

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