Is there a difference between UML Use Case "extends" and inheritance?

Or is "extends" a precedent that inherits another?

- update

Just an explanation, I read books and made a lot of diagrams. But I just do not see the difference between extensions to UML and inheritance. As Bill said, the UML extension indicates optional behavior, but by its inheritance you get new behavior that you can use or not use. So what's the difference?

+4
source share
4 answers

This is very similar to inheritance. See a detailed description of this concept here.

Enjoy it!

+2
source

I think the difference in UML is that "extends" is based on extension points, which means that there must be a named point in the use case where the extension will be applied. Semantics are not very accurate. Inheritance for use cases means changing any behavior, not exzactly indicating where.

Another important point is about inheritance and the principle of Liskov's signature. You should be able to use one use case that inherits from another, anywhere you can use another. This is not done to understand the path. When one use case is expanded by another, it means that it can be changed by another, but still it contains the main path to the script, which can be forked and combined by an expanding use case. This, I think, is about the difference between structural and behavioral inheritance. Inheritance is the achievement of the same goal and the satisfaction of the same interests - the same responsibility and limitations of behavior when the extension is associated with a change in the structure of the script path, which may be caused by additional interests - for example, error checking.

Inheritance is really not a very good mechanism to be used for use, combined with the inheritance of an actor, which makes more sense, this can lead to undesirable paradoxes. Following the recommendations of Alistair Cockburn (Writing Effective Use Cases), inheritance should only be used to express variations of technical details or data formats for a specific use case.

+2
source

In the tool that I use in my company, we have modeling limitations.

Inheritance: From actor to actor, from UseCase to Usecase, from System to System. You cannot have another inheritance in the diagram, because I have a forbidden sign.

Extension can only be performed between two Usecases, and not between other elements.

I see no difference between inheritance and continues between the two standards. I will continue to read the following posts, because after reading all the answers I still do not understand :-)

+1
source

Extensions are used to add additional, optional behavior to the used case, which expands but does not change any behavior in the base use case.

The following use case will replace one or more behaviors of an inherited use case. In other words, changing the behavior of the underlying use case, not just adding new features. Note that case inheritance is not exactly the same as class inheritance.

See this article .

0
source

All Articles