2 Replies - 2319 Views - Last Post: 18 December 2012 - 09:59 PM

#1 coder_pl  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 18
  • Joined: 03-November 12

Activity Diagram

Posted 10 December 2012 - 05:50 AM

Hello I was asked to draw a UML activity diagram based on the scenario. I would really appreciate if someone could check it and see it there is anything wrong with it, if yes then please help...

Thank you

Attached image(s)

  • Attached Image

Attached File(s)


Is This A Good Question/Topic? 0
  • +

Replies To: Activity Diagram

#2 blackcompe  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 1152
  • View blog
  • Posts: 2,529
  • Joined: 05-May 05

Re: Activity Diagram

Posted 10 December 2012 - 01:49 PM

Generally speaking it's correct, but if you want to be precise, then it would be more correct to put the condition in brackets next to the arrow taken for a diamond, as shown here.
Was This Post Helpful? 1
  • +
  • -

#3 BobRodes  Icon User is offline

  • Your Friendly Local Curmudgeon
  • member icon

Reputation: 574
  • View blog
  • Posts: 2,989
  • Joined: 19-May 09

Re: Activity Diagram

Posted 18 December 2012 - 09:59 PM

Also:

The correct style of arrowhead on activity diagrams is the open arrow. Both your diagram and the diagram in blackcompe's sample are wrong on that. (The spec is here if you would like to see for yourself. Solid arrows are used when the diagram needs different types of arrows to mean different things, as in sequence diagrams where solid arrows are synchronous and open arrows are asynchronous method calls.)

Now, it's quite right to put conditions in brackets. Change your "Queue?" to [Check if in Queue] and put that between your entry symbol and the condition diamond. Then put [yes] and [no] on the appropriate branches.

Next, I'm assuming that you intend to model the idea that someone has to wait in the queue if there isn't a seat, until one becomes available. If so, "check if in queue" should be "check if seat ready". And, "wait" should have an arrow back to the diamond rather than to Sit.

Next, change "Wet or Dry" to "[Wet]" on the arrow going to wash, and "[Dry]" on the arrow going to Cut.

Next, on the arrow leaving Cut, put [Check if cashier free]. On the arrow leading to cash or credit card, put [Yes]. On the arrow leading to Wait, put [No]. Then, remove the arrow between Wait and Cash or credit card. This one needs to point back to the check if cashier free diamond. You have to loop around this check until it's a yes, see?

Next, remove the "Cash or Credit Card?" blurb. Instead, put [cash] on the arrow leading to pay, and [debit card] on the arrow leading to PIN. (Of course, if you have a pin, it isn't a credit card.)

That should clean you up. :)

This post has been edited by BobRodes: 18 December 2012 - 10:11 PM

Was This Post Helpful? 1
  • +
  • -

Page 1 of 1