There are two basic types of association
Aggregation & Containment
the best word to express it would be custome reference types
e.g
Class Engine { public int HoursePower; }
class Auto { public Engine Engine; }
Main Class
{
PSVM {
Auto myCar=new Auto();
myCar.Engine=V6;
Console.writeline(myCar.Engine.HoursePower.toString());
}
relation between mycar and Engine is Aggreation
No comments:
Post a Comment