Step 1: Understanding relationships between classes.
In Object-Oriented Programming, classes often interact with each other through relationships. These relationships help describe how objects of one class are connected to objects of another class.
Common relationships include association, aggregation, composition, and inheritance.
Step 2: Meaning of Aggregation.
Aggregation represents a weak or non-exclusive relationship between two classes. In this relationship, one class contains or uses objects of another class, but the contained objects can exist independently of the parent object.
For example, a Department class may contain Teacher objects. Even if the department is removed, teachers can still exist independently.
Step 3: Comparison with composition.
Composition represents a strong relationship where the contained object cannot exist independently.
However, aggregation represents a weaker relationship where objects can exist independently of each other.
Step 4: Evaluation of options.
(A) Composition: Incorrect. Composition represents a strong exclusive relationship.
(B) Aggregation: Correct. Aggregation represents a non-exclusive or weak relationship between classes.
(C) Polymorphism: Incorrect. Polymorphism refers to the ability of objects to take multiple forms.
(D) Abstraction: Incorrect. Abstraction hides implementation details.
Step 5: Conclusion.
Thus, the non-exclusive relationship between two classes in object-oriented programming is called Aggregation.
Final Answer: Aggregation