• Post Reply Bookmark Topic Watch Topic
  • New Topic
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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Bear Bibeault
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Jj Roberts
  • Tim Holloway
  • Piet Souris
Bartenders:
  • Himai Minh
  • Carey Brown
  • salvin francis

Association x Aggregation e Composition

 
Ranch Hand
Posts: 75
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'd like to know the community's opinion about demonstrate aggregation and composition relationships.
Do you think that it is Worth to use this kind of relationships? Or to use only a simple association with cardinalities is the best approach?
Specifically in the Architect Certification assignment . Did you guys use aggregation and composition or only simple associations in the cases where there was a whole/part scenario?

Thanks.
 
Rancher
Posts: 43016
76
 
Antonio Rafael Rodrigues
Ranch Hand
Posts: 75
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Ulf Dittmer.
I've already read that. These points are my motivation to ask if the people usually indicate aggregation and composition in the assignment. Furthermore, if the people use it in real life.
I've never used it. In my job, even in the whole/part sceneries, we only use simple associations with cardinalities that, in our oppinion, leave the relationship clear enough.
 
Antonio Rafael Rodrigues
Ranch Hand
Posts: 75
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please. Can someone help me?

I found the very same question as mine here: https://coderanch.com/t/156017/java-Architect-SCEA/certification/Aggregation-Composition-Topic
No one responds him as well.

Thanks =]
 
author
Posts: 188
11
Oracle Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you are not sure about composition or aggregation, leave it as an association. Nothing wrong with this approach.

You just have to decide whether it is bidirectional or unidirectional. Some projects implement all relationships as bidirectional. Nothing wrong with this approach either.

The key is to understand the relationship - how is delete managed, how is the dependency from a real life point of view, etc
 
Antonio Rafael Rodrigues
Ranch Hand
Posts: 75
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Amritendu.
Good sense is the way to go.
 
reply
    Bookmark Topic Watch Topic
  • New Topic