Professional Documents
Culture Documents
Unit 2.2
Unit 2.2
Unit 2.2
N-ary association.
Aggregation.
1
Objectives
The objective is to learn the following concepts..
1. Associations
2. Recursive associations, attributed association
3. Association constraints
4. Qualified & derived associations
5. UML – aggregation
2
Associations
3
More on Associations
Association Name
Car Person
Vehicle Registration
model name
year registeredCar owner age
# of doors address
Roles Names
4
More on Associations
Simple example:
An association has a name and a numerical specification
(multiplicity indication) of how many objects on one side of
the association are connected with how many objects on the
other side.
Associations are called use relationships.
employs 0..*
Company Person
Employer Employee
5
More on Associations
7
More on Associations
8
More on Associations
Employee
name
office clerk
staffNo
roomNo *
manager 1
leads
reports to
9
N-ary Association
N-ary
association
Class1 Class2
Ternary
association
Class3
10
More on n-ary Association
Reservation
Train Seat
1 1..*
date carriageNo
trainNo seatNo
1..*
Passenger
name Ternary
title association
11
Association Class
Connection
12
Aggregation & Composition
1. Aggregation
2. Composition
13
Aggregation
14
Aggregation
Indicates
aggregation
* *
LawnMower
* *
1 1 * 1
15
Aggregation contd..
Aggregation is a strong form of an association in which an
aggregate object is made of constituent parts.
Constituent are part of the aggregate.
It is made of several lesser objects. For e.g.
Lawn mower consists of a blade, an engine, many wheels and a
deck.
Lawn mower is an assembly and parts are constituents.
Lawn mower to blade is one aggregation.
Lawn mower to engine is another aggregation and so on.
We define each individual pairing as an aggregation so that we
can specify the multiplicity of each constituent part within the
assembly.
16
Properties of aggregation
Transitivity : If A is part of B and B is part of C then A
is part of C.
Antisymmetric : If A is part of B then B is not part of A.
17
Aggregation
Server DeskComputer
Aggregation
“whole”
“part” *
Client CPU Disk Drive Keyboard Mouse
18
Aggregation versus Association
an aggregation.
If the two objects are usually considered as independent, even
19
Composition
Aircraft PassengerVehicle
Boing747
21
Metadata
Metadata is data that describes other data.
Ex. A class definition is a metadata.
Models are inherently metadata since they describe the
things being modeled.
Many real world applications have metadata such as
catalogs, blueprints, dictionaries and directories.
22
Metadata
CarModel physicalCar
1 Describes *
modelName serialNumber
Year color
basePrice options
* *
1 manufacturer owner
1
Company Person
23
Question-Answer session
24
HomeWork
25