7

1 # 0-1 SoilLayer

Figure 4-9. Example of a reflexive association with multiplicity zero or one.

In a soil profile, soil layers are in sequence: The first layer is on top, and other layers stay under the top layer, one under the other. The last layer of the profile is located at the bottom. The fact that soil layers are one under the other can be modeled using a reflexive association. In Figure 4-9, the association succeeds shows that an object of class SoilLayer can succeed zero or one other object of the same class. The top layer succeeds zero layer and all other layers under the top one succeed exactly one layer. A multiplicity of zero shows that the association is optional.

0 0

Post a comment