Search code examples
umlsequence-diagram

UML Sequence Diagram Occurrence Count


So I ran into a multiple-choice question about sequence diagrams, where one has to count the number of occurrences.

You will find in the attached image a diagram. The question is how many occurrences are there in the following Sequence Diagram?

In any case, in no way I of counting do I get to the desired result of 14 (12 is what I get ;) ) and I wonder which type of occurrence I may be missing.

Does anybody have the clarity to deliver a detailed analysis?

enter image description here

(from UML 2.5.1)


Solution

  • Soo. Hopefully this will help somebody in the future. I asked around everywhere and found somebody with an explanation that fits the answer 14.

    • Every execution (vertical rectangles) has a start and end occurrence. There are three executions -> 3*2 = 6
    • Every message (or function call) also has 2 occurrences: A send and receive occurrence. We count 4 calls, each with a send and return -> 4 * 2 = 8
    • Summing up: 6+8 = 14