File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
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: 6662

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: 8898
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
It's not a secret anymore!