Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Aggregation and Generalization

 
aakash bath
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everbody
As i had understood Agrregation mean a part whole relation ship between objects so when we say whole realtionship between ojects does it imply Generalization.
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No. A character may be a "part of" a string, but a string is not a generalization of a char.
 
aakash bath
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ilja
An example like:
A window is a part of Car is an aggreagate object.
Same Car class extending Window class is a generalization
So in this case it is both Aggregation and Generalization and so way are they related.
Regards,
Pradeep
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm not sure I understand your question...
Aggregation and Generalization/Specialization are totally orthogonal concepts. Of course you can have both at the same time, but one doesn't imply the other in any way.
Does that help?
 
Zafar Ali
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sometimes a class consists of a number of a components classes. This is a special type of relationship called aggreagation.An Aggreagation specifies a part-whole assocation class is made up of component classes.A composite is a strong form of aggreagation,and a component in a composite can be part of only one whole. Aggregation and composites are represented as lines joining the whole and the component with open and filled diamond, respectively, on the whole side.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic