![]() ![]() Only the fragment whose guard is true will execute. For conditional logic, you can use an alt operator and put a condition on each fragment. (Table 4.1 lists common operators for interaction frames.) To show a loop, you use the loop operand with a single fragment and put the basis of the iteration in the guard. Each frame hasĪn operator and each fragment may have a guard. ![]() In general, frames consist of some region of a sequence diagram that is divided into one or more fragments. Figure 4.4 shows a simple algorithm based on the following pseudocode: Both loops and conditionals use interaction frames, which are ways of marking off a piece of a sequence diagram. ![]() Treat sequence diagrams as a visualization of how objects interact rather than If you want to show control structures like this, you are better off with anĪctivity diagram or indeed with code itself. This isn’t what sequence diagrams are good at. UML Distilled: A Brief Guide to the Standard Object Modeling Language, 3rd EditionĪ common issue with sequence diagrams is how to show looping and conditional behavior. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |