I am really confused guys. what is the difference between <<include>> and <<extend>> stereotypes in use cases? and where do i use them?


<<include>> indicates composition.
<<extends>> indicates inheritance.

Composition would have one usecase enclose/use another (for example making a reservation for a hotel room would include looking up a customer).
Inheritance would have a use case be a special version of a more generic one.
For example booking the bridal suite might be a special case of booking a normal room that requires some more actions.

Ever more OO gurus are advocating against inheritance unless there's a really strong case for it (in this case for example the booking for the bridal suite could contain a normal room booking and some other things instead of BEING a normal booking and some other things), but it all depends on the circumstances.


Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.