Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Association label vs association role #135

Closed
CoderStellaJ opened this issue Oct 16, 2019 · 2 comments
Closed

Association label vs association role #135

CoderStellaJ opened this issue Oct 16, 2019 · 2 comments

Comments

@CoderStellaJ
Copy link

CoderStellaJ commented Oct 16, 2019

Can anyone help to point out why this diagram is false? And what's the difference between association role and association label? Thanks!

Quiz question:
Which diagrams are acceptable representations of the highlighted association role?
Capture

@CoderStellaJ CoderStellaJ changed the title Week 7 quiz question on class diagram Association label vs association role Oct 16, 2019
@ambervoong
Copy link

ambervoong commented Oct 16, 2019

Association roles are used to indicate the role played by the classes in the association. For example, in an association between classes A and B, class A could play the role of the husband and class B plays the role of the wife.

Association labels are the ones shown in the diagram you linked. They describe the meaning of the association. An easy way to distinguish between them is the black arrow present in association labels. Also, it often describes a relationship whereas association roles tend to be nouns like 'friend' or 'helper'!

This diagram is false because an association label is shown in the diagram, not an association role. I can't remember exactly but I think the question was asking if this was a valid association role! Otherwise, it is a perfectly valid association label.

@CoderStellaJ
Copy link
Author

Thanks for your contribution to this question.
Because the quiz question asks whether the diagram shows the correct association role but the diagram shows association label. The diagram fails to show the role.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants