Sparx Systems Forum

Enterprise Architect => Uml Process => Topic started by: Daver on February 25, 2010, 08:39:04 am

Title: Urgent Help needed! How to assign to associations
Post by: Daver on February 25, 2010, 08:39:04 am
Sorry, I'm a EA newbie, so this may be a stupid question.

I have a structure diagram, where a class has a few attributes and an association to another class. Now I need a sequence diagram, where the first one creates a new instance of the second one, and assignes it to its association.
Like this:
class A { private B b; void f() { b=new B();}}

and I need to represent the A-B association as a link, so I really don't want to create attributes for each and every one of my associations (isn't that redundant for code generation anyway?).

And more generally, how can I instantiate (e.g. for an object diagram) an association? All of my associations are set to instance level, so it's not a "static" issue.

What is the prefered method?

thanks