简体   繁体   中英

UML use case diagram <<include>> and <<extend>>

To be specific, I have a base use case A, and two extended use case A1,A2. Then I add a "include" item to A, let's call it B. My question is will A1,A2 automatically include this item B? Or do I need to add two dotted arrows from A1,A2 to B?

I don't have enough score to post image here, so just use this picture to illustrate my idea, I'm missing to arrows from A to A1,A2, hope it doesn't confuse you.

                A ------> B(include)
               / \
        extend/   \extend
             /     \
            A1     A2

Thanks!

From what I understand of your case study, wouldn't you need a generalization between A1/A2 and A, instead of extend? Extend means an optional part of the use case A, generalization means different "versions" of the use case.

And in the case of generalization, yes, included use case is inherited. In case of extend, it is not.

Indeed, if you are referencing B in A1 and A2 you will need to include (ElementImport in UML) B from them. But you can also have a Package containing A, A1 and A2 and import B from this Package, thus B will be available for all element within this Package.

A1 and A2 will not include B. You would have to include it specifically for each, if that's in fact what the behavior is (or you can do as Xaelis suggests and use package semantics). On the other hand, if A1 and A2 are specializations of A (as Steph points out), they will include B because A includes it. There's some question in my mind whether you really intend specialization rather than extension.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM