문제

Is it possible to represent this case on a sequence diagram? If yes, how? Is the newly created object represented as an absolutely new object?

Thank you for reading and replying !

도움이 되었습니까?

해결책

The simplest answer is yes. If it's a new object, it's a new object. Different from the other one. It may have the same name but it has different identity. So it just becomes a new object with its own lifeline on the sequence diagram.

hth.

다른 팁

When an object is destroyed its lifeline is also destroyed which means it is non-existent after that, so you can obviously create a new object with that name.But try to avoid creating objects with same name which run in parallel because that will invoke conflicts.Creating objects with the name of a persistent object may also give rise to conflicts.To represent it on a sequence diagram just draw an object with its own lifeline.Make sure to start the interactions after the previous object's "destruction".

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top