nus-cs2103-AY2021S2 / forum

10 stars 0 forks source link

Multiple Association/Association roles? #361

Closed yienyoong closed 3 years ago

yienyoong commented 3 years ago

What if a scenario, for example, a person can like another person, a person can also hate another person, occurs. How would the association be drawn? Is it a single association? Or would it be represented as 2 associations? I am unsure as to how I would label roles if it was a single association.

image

damithc commented 3 years ago

If likes and hates are two different relationships (I think they are), they should be two different associations. That way, a person can like one (or more) person, hate another person, and even likeand hate yet another person.

yienyoong commented 3 years ago

Thank you Prof!