I need to make an UC diagram for a project of mine, but I don't know when to use include or extend. My actor (a Professor) can choose one of his students and do some operations (ex: see his grades), now from the diagrams I saw, my see student's grades
use case should include select student
, but in my app you first need to select the student then choose the operation, should this mean see student's grade
should extend select student
?
-
1If this is for a class assignment, the best person to ask is your teacher or TA. While UML diagrams do have a formal specification, they're mostly used informally in industry. Getting the diagram technically correct is less important than drawing something that effectively communicates your intent.– Robert HarveyCommented Apr 16, 2021 at 14:53
-
1Does this answer your question? Are using <<include>> and <<extend>> relationship in this use-case diagram actually same?– Doc BrownCommented Apr 16, 2021 at 15:16
1 Answer
"Selecting a student" is not really a first class use case on its own - this step alone is incomplete, in isolation it fulfills no purpose. As you wrote about your application, the selection is actually done for choosing another operation, and only the combination of both may become something which is a complete user task.
So the selection is only a fragment of a use case: it can be part of several other first-class use cases. As explained in this older SO Q&A, this means the "includes" relation will be the more appropriate choice.