Difference: 'uses', 'extends', 'includes'

Answer Posted / julian c

Include vs extends is nothing to do with 'always' or 'sometimes'. In UML 2.x these are dependency arrow stereotypes.

If the base use case is incomplete... i.e. we can not write, build, test and use it without the linked use case then it is MANDATORY that the other use case exists; this requires and <<include>>. Getting hung up on the always/sometimes issue is counter-productive.

If we can write, build, test and use the base use case without the linked use case existing at all then it is NOT dependent on it; the linked use case however describes how it may add functionality to the base use case - THAT'S WHY THE ARROW IS THE OTHER WAY and is stereotyped <<extend>>. The extending use case is OPTIONAL in that we may or may not provide that functionality at all.

The included use case is like a sub function that is called.
An extend use case can change any aspect of the base use case and in several places. Look at it this way; if I use MSWord to open the base use case, turn on track-changes and then edit it to represent changes I want to make (usually but not limited to additional functionality) the extending use case represents those tracked changes.

<<uses>> is UML 1.x and although still prominent in Visio Use Case stencils (finally fixed in Visio 2013) is deprecated.

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are all the operators that cannot be overloaded?

545


Are constructors inherited? Can a subclass call the parent's class constructor? When?

562


Difference between class and an object?

579


Which OOPS concept is used as a reuse mechanism?

593


What are the rules to define a functional interface?

529






State about java and its relation to object oriented programming?

611


How to achieve data abstraction?

526


Differentiate between a class and a method.

573


What is a pure virtual function?

572


What is the difference between an Abstract class and Interface?

602


What is the main use of message metaphor in object-oriented programming?

663


Can you use virtual, override or abstract keywords on an accessor of a static property?

526


Explain about the analysis phase?

563


Why dynamic loading is used in object-oriented programming?

562


Why is java not fully objective oriented?

589