Podcast
Questions and Answers
What is the main difference between association and aggregation?
What is the main difference between association and aggregation?
- Association indicates one-to-one relationships, while aggregation indicates one-to-many relationships.
- The existence of objects in association is independent, while in aggregation it is not. (correct)
- Association is a one way relationship, while aggregation is a two-way relationship.
- Aggregation models a 'has a' relationship, whereas association models an 'is a' relationship.
In the context of relationships between classes through their objects, what is a common feature of association and aggregation?
In the context of relationships between classes through their objects, what is a common feature of association and aggregation?
- Both can have one to many, many to one, or many to many relationships. (correct)
- Both can only have one-to-one relationships.
- Both can only have two-way relationships.
- Both are implemented by objects containing pointers to other objects.
Which statement best describes an aggregation relationship?
Which statement best describes an aggregation relationship?
- The existence of objects in aggregation is independent of each other.
- Aggregation models an 'is a' relationship between classes.
- Aggregation implies that the enclosed class has a relationship with the enclosing class. (correct)
- Aggregation indicates a one-to-one relationship between classes.
How does an aggregation relationship differ from an association relationship?
How does an aggregation relationship differ from an association relationship?
What type of relationship does association indicate between classes through their objects?
What type of relationship does association indicate between classes through their objects?
In the context of aggregations, what happens if a student withdraws from a course?
In the context of aggregations, what happens if a student withdraws from a course?
What is the purpose of using pointers in aggregation?
What is the purpose of using pointers in aggregation?
What distinguishes compositions from aggregations?
What distinguishes compositions from aggregations?
What does it mean when it is said that 'the whole object is responsible for creation and destruction of its part(s)' in compositions?
What does it mean when it is said that 'the whole object is responsible for creation and destruction of its part(s)' in compositions?
Why is it important to use aggregations or compositions instead of directly creating new objects in certain scenarios?
Why is it important to use aggregations or compositions instead of directly creating new objects in certain scenarios?
Flashcards are hidden until you start studying