list of dots Digital Research Alliance of Canada logo  NSERC logo  University of Ottawa logo / UniversitĂ© d'Ottawa

User Manual    [Previous]   [Next]   

E181 Association Specialization Invalid Multiplicity

Umple error raised when an association specialization has an invalid multiplicity

When performing an Association Specialization, the multiplicities are more specific than that of the previously defined association. If the multiplicities on either side of the specialized association are less strict/specific, the association is considered invalid and this error is raised.

If you intend to perform specialization, this error can be avoided by narrowing the multiplicity to be more specific than that of the superclass association.
If you did not intend to perform specialization, you may have reused a rolename in the association. See E019.

Example

// This example generates the error

class Vehicle {}
class Wheel {}
class Bicycle {isA Vehicle;}

// Parent multiplicity of 0..1 to 0..2
association { 0..1 Vehicle vehicleA -- 0..2 Wheel vehicleWheel;}

// Broader child multiplicity of 0..1 to 0..3
association { 0..1 Bicycle vehicleA -- 0..3 Wheel vehicleWheel;}
      

Load the above code into UmpleOnline

 

Solution to the above so the message no longer appears

// This example shows how to resolve the error

class Vehicle {}
class Wheel {}
class Bicycle {isA Vehicle;}

// Parent multiplicity of 0..1 to 0..2
association { 0..1 Vehicle vehicleA -- 0..2 Wheel vehicleWheel;}

// Narrower child multiplicity of 0..1 to 0..1
association { 0..1 Bicycle vehicleA -- 0..1 Wheel vehicleWheel;}
      

Load the above code into UmpleOnline