Difference between revisions of "Aggregation - 2017"

From TRCCompSci - AQA Computer Science
Jump to: navigation, search
Line 1: Line 1:
 
Aggregation is where you delete the main class and all it's subclasses are kept, rather than being deleted along with it.
 
Aggregation is where you delete the main class and all it's subclasses are kept, rather than being deleted along with it.
 +
 +
==Example==
 +
The relationship between Location, warren and fox is one of aggregation. A location is just a container for references to the warrens and foxes. They are created and destroyed by the simulation, not by the location

Revision as of 15:02, 21 February 2017

Aggregation is where you delete the main class and all it's subclasses are kept, rather than being deleted along with it.

Example

The relationship between Location, warren and fox is one of aggregation. A location is just a container for references to the warrens and foxes. They are created and destroyed by the simulation, not by the location