what is difference between Extend and Include with example?
Answers were Sorted based on User's Feedback
Answer / jawad ahmed
Include, one cannot live without the other. The use case
must include another use case. For example when you create
an order you always must verify name etc.
Extend, one can live without the other only some instances
the use case will extend to another use case to do some
stuff. For example, you can create an order but if the
order is for a new customer you possible have to do
additional check which you do not have to do for existing
customers. In that case you can have an extend use case.
Is This Answer Correct ? | 206 Yes | 32 No |
Answer / ashutosh
An Extends relationship is exactly like an Includes
relationship with one important difference: An Extends
relationship is a conditional include
Is This Answer Correct ? | 48 Yes | 25 No |
Answer / mari n
Extend - if a use case is optional for another use case.
that is defiend using extend; if a use case should be
called another use case to accompalish a functionlity ,it
will be represented as include.
Is This Answer Correct ? | 32 Yes | 12 No |
Answer / ajay kumar srivastava
Include: Can not be completed without the included use case. For example To order an item, one must select the item while extends is executed on an particular event for example View Report extends print report.
Is This Answer Correct ? | 24 Yes | 11 No |
Answer / parthasarathy
<<includes>> or <<uses>> Here both the use cases should be
satisfied or the return value of one use case will affect
the other.
e.g : Let us take the ATM cash withdrawal. actor -> inserts
card -> enters pin ---<<includes>>--->Verify card.
Here if the second use case returns false ie verification
fails, then the first use case follow the alternate flow or
error flow. It will not continue the regular flow.
<<extends>> Here one use case invoke other. thats all.
Is This Answer Correct ? | 21 Yes | 11 No |
Answer / vivek kumar
Extending use case typically defines optional behaviour. It
is independent of the extending use case.
Include used to extract common parts of the behaviours of
two or more use cases
eg:-
Use case I am going to city.
Includes -> drive the car
Extends -> fill the petrol
Fill the petrol may not be required at all times but may
optionally be required based on the amount of petrol left
in the car.
Drive is a prerequisite hence I am including.
Is This Answer Correct ? | 13 Yes | 3 No |
Answer / vivek kumar
Include = reuse of functionality
Extends = new and/or optional functionality
Is This Answer Correct ? | 7 Yes | 0 No |
Answer / gupta pratayash
Its very easy.Basically both of them are two different things extends means to extend and include mean to include.
eg. extend- when you meet people you "extend" friendship.
include- when you meet people you "include" them in your group
so you can see basic difference between them through an classic real world example.
Is This Answer Correct ? | 7 Yes | 6 No |
Answer / praveen kumar
For Component:- A Component may use interface called import
A Component may realiase from interface
called export
Is This Answer Correct ? | 17 Yes | 44 No |
What is UML Architecture?
What is the purpose of UML diagrams?
What are the different types of relationship composition that exists?
What is a communication diagram in UML?
State some of the criticisms present with UML?
What are associative classes?
What is collaboration diagram in UML?
What are the relationships in UML?
UML: IS it a process, method or notation?
What are the four phases of the Unified Process ?
2 Answers Maruti Suzuki, Rana,
Does UML diagram have relationships?
How to resolve many to many relationship?