Searching...
Sunday, 8 June 2014

Association/Aggregation/Composition/Generalization simple example

01:47

Association

Relationship between two objects (one to one, one to many, many to many etc)

Aggregation

Aggregation is a kind of association, which refers Has a relationships.

Example: Building has a room

 Composition

It is a kind of Aggregation but when an object contains another object the contained object cannot exists without the container object
Example: Room cannot exist without building

Generalization

Generalization refers to Is a relation ship (Inheritance)
Example, Car is a Vehicle, Bus is a Vehicle

 

0 comments: