MCQ IN COMPUTER SCIENCE & ENGINEERING

COMPUTER SCIENCE AND ENGINEERING

SOFTWARE ENGINEERING

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
Aggregation models the ____ relationship
A
has-a
B
is-a
C
uses-a
D
None of the above
Explanation: 

Detailed explanation-1: -In UML models, an aggregation relationship shows a classifier as a part of or subordinate to another classifier. An aggregation is a special type of association in which objects are assembled or configured together to create a more complex object.

Detailed explanation-2: -Aggregation. refers to the formation of a particular class as a result of one class being aggregated or built as a collection. For example, the class “library” is made up of one or more books, among other materials. In aggregation, the contained classes are not strongly dependent on the lifecycle of the container.

Detailed explanation-3: -Aggregation is a specialized form of association between two or more objects in which each object has its own life cycle but there exists an ownership as well. Aggregation is a typical whole/part or parent/child relationship but it may or may not denote physical containment.

Detailed explanation-4: -Aggregation relationship is represented by a straight line with an empty diamond at one end. The composition relationship is represented by a straight line with a black diamond at one end. In UML, it can exist between two or more classes. It is a part of the association relationship.

Detailed explanation-5: -Aggregation implies a relationship where the child can exist independently of the parent. Example: Class (parent) and Student (child). Delete the Class and the Students still exist. Composition implies a relationship where the child cannot exist independent of the parent.

There is 1 question to complete.