I understand how sequence diagrams represent the interactions between objects by calling each other functions and the timeline trace of the function calls. I am not sure how to represent this if the function call happens to be recursive.
Put simply, I have a class with a recursive function defined to calculate the Fibonacci numbers, given the value of n
as parameter. How to show the two recursive calls on sequence diagram?
Also, should the sequence diagram should be generic? I mean, it should depict for all values of n and does not need to be adapted for different values of n, right?