Detailed explanation of UML class diagram - multiplicity analysis

I was looking at design patterns recently, and by the way, I read the UML class diagram. I had some doubts about the multiplicity while watching, record it ;-)

There are many ways to express multiplicity. For example, 1 is equivalent to 1...1, which means that an a object is associated with a b object. For example the following example:

write picture description here

The corresponding class diagram is:
write picture description here

Description of the class:

write picture description here

Take BorrowerDB and Borrower as examples, and talk about how to analyze multiplicity:
a database corresponds to 0 or more readers, so circle 4 should be filled with 0...*, a reader only exists in one database, so circle 3 should be filled with 1...1.

In the same way, the analysis of Borrower and BorrowerItems should be analyzed in this way, a reader should only correspond to one reading and borrowing file of the reader, and one reading and borrowing file is only associated with one reader. So circle 5 and circle 6 should be filled with 1...1.

Symbol Description:

1: one
1...1: one
0..*: zero or more
*: zero or more
1..*: one or more
0..1: zero or one

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324809450&siteId=291194637