Monday, November 28, 2011

Difference between Association, Aggregation and Inheritance relationships.

An Association is a relationship between similar objects or objects with common structures.

Example:
An employee object is associated with manager object.
Aggregation is “a part of” relationship.
Example:
A student object is a part of College object.
Inheritance is a “is a “relationship where one or more classes are derived from a base class. The derived class has the base class plus its own characteristics.
Example:
French_Student class can be a derived class of student class.

No comments:

Post a Comment