Book a Demo

Author Topic: How to establish the link between the classes  (Read 3746 times)

Moyeen

  • EA Novice
  • *
  • Posts: 8
  • Karma: +0/-0
    • View Profile
How to establish the link between the classes
« on: March 07, 2009, 10:55:34 pm »
There is one C# class "Bank" which  have C# int array of another C# class "Account ". I have declared the int[] in the Sale class for storing the different account number .

The class diagram showing as attribute in the Sale class as accountID:int[]

How should create link so that  class diagram is able to depict the relationship, otherwise i have to see manually the relationship across the project. I want to search the dependent class

Thanx in advance

Moyeen

  • EA Novice
  • *
  • Posts: 8
  • Karma: +0/-0
    • View Profile
How to show the link  between classes
« Reply #1 on: March 09, 2009, 08:21:17 pm »
There is one C# class "Bank" which  have C# int array of another C# class "Account ". I have declared the int[] in the Sale class for storing the different account number .

The class diagram showing as attribute in the Sale class as accountID:int[]

How should create link so that  class diagram is able to depict the relationship, otherwise i have to see manually the relationship across the project. I want to search the dependent class

Makulik

  • EA User
  • **
  • Posts: 400
  • Karma: +0/-0
    • View Profile
Re: How to establish the link between the classes
« Reply #2 on: March 11, 2009, 05:22:54 am »
Hi Moyeen,

I think this should be modeled using a simple Association link between Account and Sale class. May be choose a direction from Sale -> Account and set the target multiplicity to 0..*, you could also refer to the accountID attribute as the targets role.

HTH
Günther

Moyeen

  • EA Novice
  • *
  • Posts: 8
  • Karma: +0/-0
    • View Profile
Re: How to establish the link between the classes
« Reply #3 on: March 13, 2009, 09:48:48 pm »
Thanx Makulik,
Your advice seems to good for my purpsose. Can you give reference for using  different options like role/constraints usage. It is very neccessary for good modelling.

Thanx
Moyeen :-/

g.makulik

  • EA User
  • **
  • Posts: 355
  • Karma: +0/-0
    • View Profile
Re: How to establish the link between the classes
« Reply #4 on: March 14, 2009, 06:30:38 am »
Hi again,

Oops, I'm afraid I was confusing source and target role here. The source/target role allows you to depict, which class attributes the connector ends of the association relate to. So the accountID[] array you described plays the source role of the association, IMHO.
Hmmm, about constraints I don't have a really good example at hand, I am using them not very often, at least not with associations. Maybe someone else in the forum can give you a good example.

WBR
Günther
Using EA9.3, UML2.3, C++, linux, my brain, http://makulik.github.com/sttcl/