Help coderanch get a
new server
by contributing to the fundraiser
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
• Campbell Ritchie
• Jeanne Boyarsky
• Ron McLeod
• Paul Clapham
• Liutauras Vilda
Sheriffs:
• paul wheaton
• Rob Spoor
• Devaka Cooray
Saloon Keepers:
• Stephan van Hulst
• Tim Holloway
• Carey Brown
• Frits Walraven
• Tim Moores
Bartenders:
• Mikalai Zaikin

# Many-to-Many multiplicity relationship in class diagram

Ranch Hand
Posts: 33
• Number of slices to send:
Optional 'thank-you' note:
Hi,

Following are the possibilities of object A association with B and C having many-to-many relationships in the attached diagram.

A[1 - 0.*]--->B[0.* - 1.*]-->C

1. A can directly associate with B and also could associates with C without the existence of B.

2. C can be exist without the object B.

Please comment on the understanding of association relationship is correct or not.

-regards.
Diagram.jpg

Ranch Hand
Posts: 53
• Number of slices to send:
Optional 'thank-you' note:
This is What i understand

1) A does not know anything about C
2)No C can't exist without B.

Talking in terms of implementation it will be

class b{

new C()

}

so if B is not there there is no way C can exist

Ranch Hand
Posts: 240
• Number of slices to send:
Optional 'thank-you' note:

Ashu Sharma wrote:This is What i understand

1) A does not know anything about C
2)No C can't exist without B.

Talking in terms of implementation it will be

class b{

new C()

}

so if B is not there there is no way C can exist

1) A does not know anything about C

I agree, A can only access C by using B

2)No C can't exist without B.

B(0-*)-->C(1-*) I think means C can exist without the existing of B, but I also think this expression is not accurate:how come B0-->C1 and at the same time no one else is referencing C, if B is zero(not exist), where will C exists (C1-*)?

Riyaz Enayath
Ranch Hand
Posts: 33
• Number of slices to send:
Optional 'thank-you' note:
Thank You Ashu and Bigwood Liu.

Finally, the diagram convey something "C can exist without B somehow.."

Regards
Riyaz

 To do a great right, do a little wrong - shakepeare. twisted little ad: We need your help - Coderanch server fundraiser https://coderanch.com/t/782867/Coderanch-server-fundraiser