uml - Representing insertion of a already created object -
i'm modeling sequence diagram code this:
void myobject::createadevice{ device* somedevice = new device(); devices[i] = somedevice; screen* scr = new screen(); somedevice->addscreen(scr); ... }
this code have doubts. i'm modelling no problem until call of somedevice->addscreen()
. i've created self message object creation device , screen objects. i'm failing represent last line. how can that?
p.s: i'm using enterprise architect
the device , screen objects needs own lifelines. new operator can represented messages device , screen. addscreen message device.