0
1.7kviews
Explain loop control in sequence diagram.

Subject: Object Oriented Modeling and Design

Difficulty: Medium

Marks: 8 Marks

1 Answer
0
43views

Loop is used to show repetitive execution of interactions. Loop fragment operator is used inside fragment box to indicate recursive application. Loop can be controlled either with iterations or with a guard condition. Loop operator can have values for lower bound and upper bound. When loop operator does not contain bounds it indicates that the interaction execute with zero as lower bound and infinite upper bound.

Example:-

  1. In the sequence diagram below, the loop has no bound specified with operator. So lower bound of the loop is 0 and upper bound is infinite.

enter image description here

  1. The operator in the below sequence diagram has only one value so loop will be executed exactly the specified number of times i.e. 10.

enter image description here

  1. In the below sequence diagram, the loop contains lower bound as well as upper bound value so the loop will execute six number of times.

enter image description here

Please log in to add an answer.