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

User Manual    [Previous]   [Next]   

W044 Attribute Duplicated in Superclass

Umple semantic warning reported when an attribute in a class is a duplicate of an attribute in a superclass and their types differ.

The purpose of this warning is to alert the developer that they have to resolve the issue by changing the name of the duplicated attribute in either the superclass or subclass, or else remove one of them entirely, as you should not define an attribute twice with a different type.

Example

// This example generates the warning message
class A {
  Integer attr;
}

class B {
  isA A;
  attr;
}

      

Load the above code into UmpleOnline

 

Solution to The Above So the Message No Longer Appears

//This example solves the problem
class A {
  Integer attr;
}

class B {
  isA A;
  differentAttr;
}
      

Load the above code into UmpleOnline