UML and it's notation

C

calvin

hello,
i want to draw an UML class diagram in visio, but i dont know which
relationship to use, this is my case, please help
There's 2 class, which is class A and class B, class A uses a method from
class B, what should i use from visio to draw it relationship ?

thanks,
calvin
 
P

Paul Herber

hello,
i want to draw an UML class diagram in visio, but i dont know which
relationship to use, this is my case, please help
There's 2 class, which is class A and class B, class A uses a method from
class B, what should i use from visio to draw it relationship ?

Generalization
The arrow head points to the class that is inherited from i.e. from
the sub-class to the super-class.
 
C

calvin

Hi Mr Herber,
Thanks for your reply, by the way, what if class A only call a method from
class B, not making the method (from class B) into it's own method (class A
method)
FYI, I used Javascript languange

Please help me, coz I'm confused between association and generalization

Thanks,
Calvin
 
A

Andreas Hägglund

When "reading" a generalization relationship use "kind of" and when "reading"
an association relationship use "knows"

For example: If you can say that a car is "kind of" a vehicle then you
depict this by using generalization. If you say that a person knows his (or
hers) car then you draw an association.

If an object wants to call a method in another object, than there need to be
an association between the two so that the objects knows of each other. If
you want to make it more complicated/precise you can use bidirectional
relationships to show that just one of the objects know of the other. There
are also a tighter relationship between objects that you can use, i.e. "part
of". If you read "a is part of b" like in "a room is a part of a house", than
you use aggregation-relationship or a composition (i.e. an association with a
white or black triangle on one end).

Hope this helps, and that it wasn't too late...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top