Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

What is aggregation and composition ?

Answer Posted / balbir

Aggregation differs from ordinary composition in that it
does not imply ownership. In composition, when the owning
object is destroyed, so are the contained objects. In
aggregation, this is not necessarily true. For example, a
university owns various departments (e.g., chemistry), and
each department has a number of professors. If the
university closes, the departments will no longer exist,
but the professors in those departments will continue to
exist. Therefore, a University can be seen as a composition
of departments, whereas departments have an aggregation of
professors. In addition, a Professor could work in more
than one department, but a department could not be part of
more than one university

Is This Answer Correct ?    6 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a line separator in java?

923


What about abstract classes in java?

1011


What is the difference between an object-oriented programming language and object-based programming language?

943


How do we access static members in java?

1055


What are the types of exceptions?

987


Is java based on c?

934


What is double in java?

924


What is scope & storage allocation of static, local and register variables? Explain with an example.

961


What is percentage in java?

954


What are the types of methods in java?

1034


What are the data types supported by java?

967


Can you achieve runtime polymorphism by data members?

1073


What is the difference between processes and threads?

991


Explain the difference between call by refrence and call by value?

971


Is arraylist a class in java?

991