Book a Demo

Author Topic: Modelling initialization of a class  (Read 6026 times)

jmacki

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Modelling initialization of a class
« 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

Bruno.Cossi

  • EA User
  • **
  • Posts: 803
  • Karma: +0/-0
    • View Profile
Re: Modelling initialization of a class
« Reply #1 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