1

Is inheritance in use case diagrams between actors limited to one specific diagram or is it applies to other diagrams too? e.g. I got 2 actors let's say Actor A, Actor B. I got also two use case diagrams lets say Foo and Bar that show some use cases (Foo got 3 different use cases than Bar, Bar got 3 different use cases than Foo). On Foo diagram I use inheritance between actors. On Bar diagram I connect Actor A with 1 use case and Actor B with 2 others. Does it mean that Actor B got access to that 1 use case that is connected with Actor A via inheritance (even if I dont use inheritance on that diagram but because I used inheritance in other diagram) or this does not work that way and inheritance is limited to specific diagram?
0

2 Answers 2

1

In principle, every UML diagram shows a sub-set of a larger, overarching model (even if such a model is not explicitly created).

If you show a relation between two elements in a diagram, then that relation is part of the model and it will exist always, even if there is another diagram that shows the same elements but not the relation between them.

To go with your specific example, if you have a diagram showing Actor B is a more specific version of Actor A (Actor B inherits from Actor A), then that relation between the actors also applies to other diagrams, where you don't show the inheritance explicitly.

Actually, with the inheritance of Actor B from Actor A, you are telling that Actor B can do everything that Actor A can, plus some Actor B-specific things.

1

Inheritance relationships are directed. That's why they come with arrow heads. So saying "I connect Actor A ... and Actor B ... via inheritance" doesn't say enough. Leaves us with no idea which way the arrow head is pointing.

The behavior of the ancestor is inherited by the descendant. This is used when there is common behavior between two use cases and also specialized behavior specific to each use case.

creately.com - Use Case Diagram Relationships Explained with Examples

The arrow head should point from the descendant to the ancestor. Sort that out and you have your answer.

2
  • Imagine Actor B is the descendant of the Actor A in some Foo use case diagram that describes some part of my system so naturally Actor B has access to all use cases that has Actor A. Lets move to another use case diagram. Bar describes another part of my system. Here I placed Actor A and Actor B as well but I do not use inheritance. Actor A is realted with 1 use case, Actor B is related with some other two. Question: On Bar diagram is Actor B related to that one use case that is related Actor A or is not? Does one used inheritance work across all other use case diagrams or is limited?
    – Mr Lukas
    Commented Jan 25, 2023 at 21:20
  • I would hope it's limited. Because otherwise each actors name would need a namespace prefix to tell you when this is the same actor from some previous diagram. It's better when you can tell the whole story on one page. Commented Jan 25, 2023 at 22:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.