3

When drawing a sequence diagram , I saw that I need to implement an "OR" statement.Such as,

CUSTOMER can pay the bill to either WAITER or CASHIER.

Now,I have a paidBill() function which can pay either waiter or cashier. Please help to draw this.

  • 1
    Possible duplicate of [How to show "if" condition on a sequence diagram?](http://stackoverflow.com/questions/8114770/how-to-show-if-condition-on-a-sequence-diagram) – Peter Uhnak Nov 10 '15 at 07:04

2 Answers2

3

This is not really "OR", because that would imply that you can pay both Waiter and Cashier at the same time ("OR" is one, the other, or both). So what you want instead is if/else. This is denoted by combined fragments.

enter image description here

Peter Uhnak
  • 9,617
  • 5
  • 38
  • 51
0

Exact same answer with Peter except "paidBill() function" showing on the diagram.

Sequence diagram

xmojmr
  • 8,073
  • 5
  • 31
  • 54
  • 2
    You should comment on your solution some more, don't just post a picture. Don't just explaint *what* you did, also tell *why* you altered the diagram this way. – user1438038 Nov 10 '15 at 10:33