Sparx Systems Forum

Enterprise Architect => Uml Process => Topic started by: jmacki on May 12, 2004, 08:54:30 am

Title: Modelling initialization of a class
Post by: jmacki on May 12, 2004, 08:54:30 am
Hello,

How do you model the initialization of one class by another? For example, if Class A needs class B as a parameter to it's constructor, how would that be represented in UML?

Right now, I draw a dependency arrow from class A to class B labelling class B the "initializer" in the relationship.

- Jason
Title: Re: Modelling initialization of a class
Post by: Bruno.Cossi on May 12, 2004, 10:17:50 am
This should be modelled in the Sequence (or "Interaction" diagram in UML 2). On each sequence message, you can indicate the lifecycle specification, e.g. "New" when one class creates new instance of another.

Bruno