Reading an association relationship

I read the illustrated relationship as: Class A related to class B

So what's the point:

1) + class B at the end of the association

2) 0..1

Now how can I read the relationship?

+3


source to share


3 answers


totally agree with @Wolfgang Fahl and @Idan Arye

Here's some development

1) your question concerns the purpose of the Association, and in your case

visibility (+) followed by role name (class B)

The end of the association indicates the role that the object is at one end of the relationship. Each end of a relationship has properties that indicate the role of the end of the association, its multiplicity, visibility, navigation, and constraints.



2), to be more attractive, see the following class diagram:

enter image description here

a client can have many reservations

but each reservation belongs to one customer

Hope this help will help you.

+3


source


2) - for each instance of A, there can be 0 or 1 instance of B associated with it.



+1


source


the + denotes the visibility of the role. "+" is public. private will be displayed as "-". The role name is class B, which is the name of the class whose role belongs to in lower case.

+1


source







All Articles