Stephenson College DP 98 1 Associations & Aggregations by Derek Peacock
Stephenson College DP 98 2 Associations a One to One a One to Many a Many to Many Associates with
Stephenson College DP 98 3 Uni-Directional Association SwitchLight bulb Controls Actor Server
Stephenson College DP 98 4 Application Associations LecturerUnits Teaches Contract Teaches to * Classroom Taught in * *
Stephenson College DP 98 5 Containment v. Containers a One object composed of fixed no of other objects a Can not exist without its components a e.g. a Car is composed of and engine, four wheels a One object may contain a variable no of other objects a Can exist independently a e.g. a Car Boot may contain some luggage, some books, some wine
Stephenson College DP 98 6 Composition (of parts) Clock HandFaceBody 2 Battery
Stephenson College DP 98 7 Aggregation a Parts can have independent life outside aggregation a e.g. a battery as part of a clock, as opposed to the hands of the clock
Stephenson College DP 98 8 A Checkout Aggregation Checkout Barcode reader Weighing scale Till Customer Queue
Stephenson College DP 98 9 The Solent Hotel a Has 5 function £200 a Has 40 bedrooms a 10 single £40 a 30 double £55 a One set of presentation equipment a Customers name and payee recorded
Stephenson College DP UML Class Diagram (1) Hotel Single Room Double Room Function Room Equipment Is in
Stephenson College DP UML Class Diagram (2) Single Room Double Room Function Room Customer Books 0..1