UML Diagram: Online Store Class Diagram and Relationship

I work in an online store. This is a simple web store, and I need to create UML diagrams for the class and show the multiplicity. I was a little confused about the multiplicity that I encountered. I do not know how to distinguish composition, aggregation and association. Below is the chart I came across. Can someone tell me if I'm on the right track?

http://i.imgur.com/8FwhsaI.jpg

+4
source share
2 answers

Not so bad. You should not worry too much about aggregation unless you need to deal with memory management or foreign key constraints in database design. Just leave them.

One important change you must make is the role names for associations. For instance. instead shippingAddress:Address, declared as an attribute, a role is used shippingAddressthat appears next to the association on Address, which comes from User(etc. for others).

Since it Addressis an ordinary place and is used everywhere, you can leave the class from this diagram and create a separate diagram where it Addressis in the middle, and all the others surrounding it

+4
source

, , . , - . , .

  • getter setter *
  • *
  • User ( , , OrderLine Order;
  • OrderLine Review, ;
  • . ( , , ).

() - ()

  • , , , (: CreditPayment CreditPayment);
  • . Orderline.

*, .

0

Source: https://habr.com/ru/post/1660451/


All Articles