質問

After reading a lot, I was quite confident when it came to class diagrams. Yet I do not understand the following:

ChessManSet-<>----------16-ChessMan

Why is there not 0..16? Player can loose his chessman. This was displayed in a model done by a respected designer in my company and when I asked about that, he said only "they still belong to him". So I'm a bit confused, I would expect that to be implemented as a list which obviously could decrease in its size from 16 to 0.

役に立ちましたか?

解決

The only sure thing is that according to your model or design in the implementation you will always have 16 chessman instances. Of course you can choose to implement a list which could decrease from 16 to 0 but, as you said, you have to change the cardinality from 16..16 to 0..16.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top