Meaningless Drivel is fun!
The moose likes Java in General and the fly likes Association /aggregation/composition Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Elasticsearch in Action this week in the Big Data forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Association /aggregation/composition" Watch "Association /aggregation/composition" New topic
Author

Association /aggregation/composition

Nilesh Deshpande
Ranch Hand

Joined: Jan 11, 2006
Posts: 36
I am bit confused about the relation between association /aggregation/composition.

I can define the aggregation in following code. Please help me to define the other two.
Class A{
}
class B {
A a =new A();
}

Thanks in advance.
Deepak Bala
Bartender

Joined: Feb 24, 2006
Posts: 6662
    
    5

Here you go dude ! Its c++ but its UML all the same.

UML concepts


SCJP 6 articles - SCJP 5/6 mock exams - More SCJP Mocks
Bert Bates
author
Sheriff

Joined: Oct 14, 2002
Posts: 8886
    
    5
We're going to move this over to the intermediate forum - these topics aren't on the SCJP exam.


Spot false dilemmas now, ask me how!
(If you're not on the edge, you're taking up too much room.)
 
Consider Paul's rocket mass heater.
 
subject: Association /aggregation/composition