Regarding 0 to 1 and 1 to 0 associations in UML

12,571

You have to read it the other way around.

If you have 1..* on the Class end that means that a Student has at least 1 and possible more Classes.

0..* on the Class end means that a student could also have no Classes at all.

Share:
12,571
PrabaharanKathiresan
Author by

PrabaharanKathiresan

Updated on June 12, 2022

Comments

  • PrabaharanKathiresan
    PrabaharanKathiresan about 2 years

    Just want to know how can we differentiate the multiplicities 0..* and 1..*.

    For example:

     ---------             ---------
    |         |0..*   0..*|         |
    |CLASS    |-----------| STUDENT |
    |         |           |         |
     ---------             ---------
    

    For this, if we put 1..* in class object, I can see that both represent the same behaviour. Is that right?

    0..* ---> Zero or more classes can have zero or more students, which means a class or more classes can have more students or no students. (excluded no class behaviour)

    1..* ---> One or more classes can have zero or more students, which means a class or more classes can have more students or no students.

    Please correct my understanding?

  • PrabaharanKathiresan
    PrabaharanKathiresan over 8 years
    Thank you... Clearly understand the difference now.