Difference between revisions of "Aggregation - 2017"

From TRCCompSci - AQA Computer Science
Jump to: navigation, search
 
Line 2: Line 2:
  
 
For example, if college decided disband your Computer Science group you would all still exist as students.
 
For example, if college decided disband your Computer Science group you would all still exist as students.
 +
 +
==Skeleton Program==
 +
No examples of aggregation exist in the skeleton program.
 +
 +
If you did want to use aggregation you could declare you objects in the <code>static void main()</code> of your program.

Latest revision as of 10:05, 15 June 2017

Aggregation is creating an object containing other objects in a way that they will continue to exist even if the containing object is destroyed.

For example, if college decided disband your Computer Science group you would all still exist as students.

Skeleton Program

No examples of aggregation exist in the skeleton program.

If you did want to use aggregation you could declare you objects in the static void main() of your program.