File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Architect Certification (SCEA/OCMJEA) and the fly likes Use Case -- extends vs include Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Certification » Architect Certification (SCEA/OCMJEA)
Bookmark "Use Case -- extends vs include" Watch "Use Case -- extends vs include" New topic
Author

Use Case -- extends vs include

Sujatha Kumar
Ranch Hand

Joined: Jan 05, 2004
Posts: 134
Can some one explain me the difference between extends and include.
What i understand from my reading is that
"A use case which uses extends is an independent component" where as
"A use case which uses include is a dependent component and cannot exist independently"
It would be great if someone share their comments on this topic.


SCJP,SCWCD,SCBCD,SCEA Part I
Dhanush Dharsh
Ranch Hand

Joined: Oct 30, 2000
Posts: 33
An extend dependency is a generalization relationship where an extending use case continues the behavior of a base use case. The extending use case accomplishes this by conceptually inserting additional action sequences into the base use-case sequence. This allows an extending use case to continue the activity sequence of a base use case when the appropriate extension point is reached in the base use case and the extension condition is fulfilled. When the extending use case activity sequence is completed, the base use case continues. An extending use case is, effectively, an alternate course of the base use case. In fact, a good rule of thumb is you should introduce an extending use case whenever the logic for an alternate course of action is at a complexity level similar to that of your basic course of action. Many use-case modelers avoid the use of extend dependencies as this technique has a tendency to make use-case diagrams difficult to understand.
Another way to indicate potential reuse within use-case models exists in the form of include dependencies. An include dependency, formerly known as a uses relationship in UML v1.2 and earlier, 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. You use include dependencies whenever one use case needs the behavior of another. Introducing a new use case that encapsulates similar logic that occurs in several use cases is quite common. For example, you may discover several use cases need the behavior to search for and then update information about students, indicating the potential need for an �Update Student Record� use case included by the other use cases.
This is an abstract of a doc I downloaded sometime back. I found this immensly useful. Hope you feel the same way .
Jason Stull
Ranch Hand

Joined: Feb 02, 2004
Posts: 47
Hi Dhanush,
Could you please post a link to that document? Thank you!


"I believe in coyotes and time as an abstract Explain the change the difference between What you want and what you need there's the key"
Dhanush Dharsh
Ranch Hand

Joined: Oct 30, 2000
Posts: 33
Took me some time to figure out the page from my favourites (count exceeds 100). Click Agile modelling UML guidelines.
This site is a good resource for learning UML....Happy browsing.
Jason Stull
Ranch Hand

Joined: Feb 02, 2004
Posts: 47
Thanks for digging that up for me Dhanush!
Handong Wang
Greenhorn

Joined: Mar 11, 2004
Posts: 4
My understanding is that extend is *conditional* or *optional" include.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Use Case -- extends vs include
 
Similar Threads
Difference between using Document Filter and Plaint Document as input limit length in JTextField??
How to display HyperLink Data in JTable column
Use case diagram
NullPointerException
jtabbed pane question