Difference between message types in sequence diagrams

What's the difference between?

Message itself Recursive message Return message

thanks

+4
source share
2 answers

A message itself is a type of message representing a call to an execution or operation on the same lifeline of an object.

A recursive message is a type of self-message that runs recursively.

The reentry message is where you have object A and and oject B.

  • A makes a call C to B
  • B needs some data from A to complete the call to C
  • B sends a message A to receive the data necessary to complete the call C

The call that B makes for A is called a repeat message.

Hope this makes sense !!!

+8
source

The result of calling function E is used to end the call to another function on the same line as function E.

Example: The Main function from the data life cycle of the controllerC object of the object from the EvaluateStudent function (located in the StudentC area ) to use it as a parameter to call another function also located in the same StudentC area . Importantly, calls must be made from outside the scope of StudentC. In our case, calls are made with ControllerC.

public StudentC { public function int EvaluateStudent(object student) { /*... perform complex evaluation here ...*/ } public function int IsTopStudents(int score, int acceptanceLevel) { return(score > acceptanceLevel); } } public ControllerC{ Public function Main() { IsTopStudent(EvaluateStudent(student), 8); } } 
+1
source

Source: https://habr.com/ru/post/1311955/


All Articles