What is ageeregation & Composistion ?

  
Showing Answers 1 - 9 of 9 Answers

Sasi komala

  • Jan 4th, 2007
 

Aggregation ---It means for example one Colleage is build up of Depatments and again departements contains classes right here school is aggregation of departements and again departement is aggregation of classes,here u can perfect aggregation of things if u delete the main object called school all associated departements and classes will get delete.

 

Compostion--It means how objects are composed of means in other words it is tightly bound aggregation here even u will not have access to delete child objects which are nested in parent objects.

 

  Was this answer useful?  Yes

CooCoo

  • Mar 5th, 2007
 

Aggregation: when one class owns but shares a reference to objects of another class. symbol: empty diamond arrow.

Composition: when one class contains objects of another class. symbol: filled diamond arrow.

  Was this answer useful?  Yes

Priyank Jain

  • Jun 20th, 2007
 

Aggregation: Child object refrence exists even after the Parent object refrence set to null.
In Some Scenarios child refrence is required even after the Parent object refrence set to null. Then aggregation is solution to go for.

Composition: Child object refrence set to null after the Parent object refrence set to null. so child Object doesn't exists independently in composition, possible in aggregation.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions