Quiz on Object Relationships

Test your understanding of object relationships.

1

Consider a scenario where users can connect with other users by sending friend requests. Each User class contains their name, age, and interests. Users can have multiple connections, represented by the Friendship class. The Friendship class records the relationship between two users. It stores information about the status of the friendship, such as pending, accepted, or declined. It also keeps track of the date when the friendship request was sent or accepted.

Which type of relationship best describes the relationship between the Friendship class and the User class?

A)

Association

B)

Aggregation

C)

Inheritance

D)

Composition

Question 1 of 50 attempted