1

For my deposit use case in the communication diagram below: I make 3 successive calls to the Account class which contains isPreferred(), isCardHolder(), and updateBalance(). I don't know if the looping symbol I used above Account is a way to display multiple calls to the same class, so any help is appreciated.

enter image description here

My operation sequence:

enter image description here

The possible sequence scenario I'm aiming for: 1, 2, 3, 3, 3, 4, 5 (printReceipt).

S. Coughing
  • 176
  • 1
  • 11
  • where are the name of the called operations in the diagram ? – bruno Nov 08 '20 at 17:03
  • >I make 3 successive calls to the Account class which contains isPreferred(), isCardHolder(), and updateBalance(). aren't operations left out of the communication diagram? – S. Coughing Nov 08 '20 at 17:06
  • ok but where is visible in your diagram ? Even the numbering is wrong because it does not correspond to the messages – bruno Nov 08 '20 at 17:07
  • how is the numbering wrong? i don't know if it should be visible in the diagram: my professor leaves operations out of the diagram – S. Coughing Nov 08 '20 at 17:11

1 Answers1

4

your diagram does not show the messages nor their numbering, the numbering you show correspond to nothing

out of that your reflexive arrow is correct having self message(s)

an extract of the sequence following normalized notation can be :

enter image description here

it is also possible to use hierarchical numbering rather than global numering

P.S. classes Screen/DBinterface and message communicate_DB are very 'strange' but this is not the subject of the question

bruno
  • 32,421
  • 7
  • 25
  • 37
  • oh i see now; i wish i could do this, but my professor doesn't want operations to be in the diagram – S. Coughing Nov 08 '20 at 17:15
  • @S.Coughing if operations do not appear the diagram is fully useless, are you sure you understand your professor ? Note it is also possible to use hierarchic numberig for the message – bruno Nov 08 '20 at 17:16
  • i understand my professor: his examples did not include operations on the diagram . . . – S. Coughing Nov 08 '20 at 17:19
  • @S.Coughing What on earth do you want if the above is not the answer/being allowed? – qwerty_so Nov 08 '20 at 17:19
  • @qwerty_so i want to know if there is a way to show multiple function calls to my Account class in the communication diagram i included in the question – S. Coughing Nov 08 '20 at 17:28
  • @S.Coughing from where the numbers 1,2,3,3,3,4,... come, statement ?can you use other numbers in the diagram ? if no there is not even illegal way to show what you want – bruno Nov 08 '20 at 17:30
  • i don't understand what your asking me, but that's the path my diagram follows if it's a successful deposit – S. Coughing Nov 08 '20 at 17:36
  • 1
    I want to say if the 3 reflexive message are all numbered 3 it is not possible to distinguish them not to know there are 3, but if you can use/show different numbers in the diagram for them at least we know there are 3 .... even this is stupid because not showing the message we learn nothing in fact. I really think you understand wrong your teacher – bruno Nov 08 '20 at 17:39
  • 2
    @S.Coughing What Bruno shows in the answer is a real [communication diagram](https://www.uml-diagrams.org/communication-diagrams.html). Communications require a sequence numbering AND a message (which takes the name of an operation). If your professor doesn't want it, he/she doesn't teach UML. – Christophe Nov 08 '20 at 17:40
  • alright thanks guys, and i agree that DBinterface/communicate_DB are very strange; i'm closely following my professor's example. this might not be a correct communication diagram, but it is close? just that the sequence number and message are split into two different separate images or slides since my professor is using powerpoint. – S. Coughing Nov 08 '20 at 17:46
  • @S.Coughing Screen is also very strange – bruno Nov 08 '20 at 17:48
  • @bruno i can include my class diagram in my original message; the screen class is just used to display the atm's gui? – S. Coughing Nov 08 '20 at 17:48
  • 1
    @S.Coughing Screen cannot be a class. Yes you can edit your question to give more information ... except if you want to ask a different question – bruno Nov 08 '20 at 17:50
  • 1
    @S.Coughing why you added the class diagram ? if you want we speak about it this is an other question ... and must be given in an other question (with not only the diagram but a question to explain;-) ) – bruno Nov 08 '20 at 17:55
  • @bruno got it sorry, i don't know how i would phrase that question – S. Coughing Nov 08 '20 at 17:57