This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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 Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Association /aggregation/composition" Watch "Association /aggregation/composition" New topic

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

Joined: Feb 24, 2006
Posts: 6661

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

Joined: Oct 14, 2002
Posts: 8805
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.)
I agree. Here's the link:
subject: Association /aggregation/composition
Similar Threads
Association Vs Aggregation Vs Composition
What is a good example of association
Is that an association?
association, aggregation, Composition
Association, aggregation, composition in class diagram