Meaningless Drivel is fun!
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Aggregation Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Aggregation" Watch "Aggregation" New topic
Author

Aggregation

Anu
Ranch Hand

Joined: Oct 31, 2000
Posts: 54
Can someone pls do me a favor of explaining wht does Aggregation means in Java. I would also like to know abt aggregate object.

Thanx in Advance.
Anukampa
Bharatesh H Kakamari
Ranch Hand

Joined: Nov 09, 2000
Posts: 198
Inheritance is a 'is a' Relationship.

This is 'is a' relationship. Sub class is-a Super class.
If a class extends another the relationship is termed as 'is-a'.
Now consider the following:

This is a 'has-a' relationslip. If a class has an object of another class, it is a 'has-a' relationship. Or Aggregation.
HTH
Anu
Ranch Hand

Joined: Oct 31, 2000
Posts: 54
Thanx a ton Bharatesh. I got yr point and concept too.

Anukampa
Jaya Murugan
Ranch Hand

Joined: Nov 18, 2000
Posts: 34
anukampa,
thanks for the nice explantion. what about implementing the interface.???
thanks
regards
Jaya Murugan
rajni_singh
Greenhorn

Joined: Oct 30, 2000
Posts: 7
I think implementing an interface will be again
"is - a " relationship.
Correct me if I am wrong.
Bharatesh H Kakamari
Ranch Hand

Joined: Nov 09, 2000
Posts: 198
The class-interface relationship is termed as Realization relationship (This is from Rational Rose tool)
Definition : Realize Relationship
Definition
A realization relationship between classes and interfaces and between components and interfaces shows that the class realizes the operations offered by the interface.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Aggregation
 
It's not a secret anymore!