3⃣ Aggregation
The relationship between the whole and part, and the whole and part can be separated.
Aggregate relations also represent the relationship between the whole and part of the class, member objects are part of the overall object, but the member object can exist independently from the overall object.
For example, bus drivers and work clothes and hats are part of the overall relationship, but they can be separated. Work clothes and hats can be worn on other drivers. Bus drivers can also wear other work clothes and hats.
بمعنى أن كل اوبجيكت مستقل عن الاخر فقط يتم الاستفاده من اوبجيكت معين في لفتره محدوده وذا انتهى الاوبجيكت الاول يبقى الثاني كما هو ولا يتأثر اي ان هذه العلاقة عكس ال composition تماما
#classes_relationship
#Java_Level_2
————————————————
📍Channel: @java_tutorial0101
The relationship between the whole and part, and the whole and part can be separated.
Aggregate relations also represent the relationship between the whole and part of the class, member objects are part of the overall object, but the member object can exist independently from the overall object.
For example, bus drivers and work clothes and hats are part of the overall relationship, but they can be separated. Work clothes and hats can be worn on other drivers. Bus drivers can also wear other work clothes and hats.
بمعنى أن كل اوبجيكت مستقل عن الاخر فقط يتم الاستفاده من اوبجيكت معين في لفتره محدوده وذا انتهى الاوبجيكت الاول يبقى الثاني كما هو ولا يتأثر اي ان هذه العلاقة عكس ال composition تماما
#classes_relationship
#Java_Level_2
————————————————
📍Channel: @java_tutorial0101
❤🔥1
4⃣ Association
Indicates that a property of a class holds a reference to an instance (or instances) of another class .
Association is the most commonly used relationship between a class and a class, which means that there is a connection between one type of object and another type of object. Combinations and aggregations also belong to associative relations , but relations between classes of affiliations are weaker than the other two.
There are four kinds of associations : two-way associations , one-way associations , self-association , and multiple-number associations .
For example: cars and drivers, one car corresponds to a particular driver, and one driver can drive multiple cars.
#classes_relationship
#Java_Level_2
————————————————
📍Channel: @java_tutorial0101
Indicates that a property of a class holds a reference to an instance (or instances) of another class .
Association is the most commonly used relationship between a class and a class, which means that there is a connection between one type of object and another type of object. Combinations and aggregations also belong to associative relations , but relations between classes of affiliations are weaker than the other two.
There are four kinds of associations : two-way associations , one-way associations , self-association , and multiple-number associations .
For example: cars and drivers, one car corresponds to a particular driver, and one driver can drive multiple cars.
#classes_relationship
#Java_Level_2
————————————————
📍Channel: @java_tutorial0101
❤🔥1