UML Aggregation with and without arrow head

前端 未结 4 1353
轻奢々
轻奢々 2021-01-02 10:43

I always thought that the UML aggregate is defined as a black (filled) diamond at the beginning of a path and no arrow head that the end:

|--------|        |         


        
4条回答
  •  无人及你
    2021-01-02 11:16

    Direction implies a client/server or master/slave relationship. In the case of aggregation, the usual situation is the programmer uses the aggregate to find the sub-components for that object (e.g., use the car to find the car parts). Directionality towards the part class makes this relationship explicit, though in most cases it is redundant.

提交回复
热议问题