Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


samar
Java aggregation
1 Answer(s)      3 years and 11 months ago
Posted in : Java Interview Questions


Please Explain, what is the aggregation?

Advertisement
View Answers

October 23, 2010 at 6:24 PM


Hi,

Here is the answer.

Aggregation is a relationship between two classes that is best described as a "has-a" and "whole/part" relationship. It is a more specialized version of the association relationship.

The aggregate class contains a reference to another class and is said to have ownership of that class. Each class referenced is considered to be part-of the aggregate class

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. Therefore, a University can be seen as a composition of departments, whereas departments have an aggregation of professors.

Thanks.



Related Tutorials/Questions & Answers:
Java aggregation
Java aggregation  Please Explain, what is the aggregation
The aggregation in Java - Java Beginners
The aggregation in Java  Hi, What is aggregation? Thanks   Hi Friend, Aggregation is a type of association that specifies a whole/part relationship between the aggregate and a component part. Thanks
Advertisements
aggregation
aggregation  explin me about the types of aggregation in OOT
Hibernate Criteria Projections, Aggregation and Grouping
Hibernate Criteria Projections, Aggregation and Grouping In this tutorial you will learn about the Projections, Aggregation and Grouping in Criteria Query... goodsdealer 2. When you will execute the java file
java puestion
java puestion  is aggregation is oop principle
CORE JAVA
CORE JAVA  What is called Aggregation and Composition
java code - Java Beginners
java code  Write a program that performs flashcard testing of simple mathematical problems. Allow the user to pick the category. Repetitively... Relationships (Association or Aggregation or Composition or Inheritance
OOPS - Java Interview Questions
OOPS  what is mean by aggregation? and what is mean by association.... Aggregation: In aggregation , one object is composed of multiple objects... Aggregation. Thanks  Hi friend, Aggregation is a special kind
java
java  diff bt core java and java
java
java  what is java
Java
Java   Whether Java is pure object oriented Language
JAVA
JAVA  how the name came for java language as "JAVA
java
java  different between java & core java
java
java  explain technologies are used in java now days and structure java
java
java   why iterator in java if we for loop
java
java  what is java reflection
java
java  is java open source
java
what is the size of array in java ?  what is the size of array in java ? what is the mean of finalize in java
java
java   in java does not pointers concept but what is nullpointers in java?   nullpointer is a runtime Exception
java
java  write a java program using filenotfoundexception
Java
Java  how to draw class diagrams in java
java
java   difference between class and interface
java
java  why multiple inheritance is not possible in java
java
java  explain object oriented concept in java
java
java  is java purely object oriented language
Java
Java   Whether Java is Programming Language or it is SOftware
java
java  what are JAVA applications development tools
java
java  how use java method
java
java  send me java interview questions
java
java  write a program in java to acess the email
java
java  Write a java code to print "ABABBABCABABBA
Advertisements
 

 

 

DMCA.com