uOttawaUniversity of Ottawa - Canadas University
list of dots

Umple User Manual    [Previous]   [Next]   

Loading

E006 Missing Default

Umple syntactic error reported when no default value is specified after an attribute that is marked defaulted

The keyword 'defaulted' means that the attribute will be given a default value if the value is not set in the constructor. Omitting the default value is therefore illogical. The default value is specified after an equals sign.

Example

// This example generates the error message
class X {
  defaulted Integer a;
}

      

Load the above code into UmpleOnline

 

Another Example

// The following shows how to avoid the error
class X {
  defaulted Integer a = 5;
}

      

Load the above code into UmpleOnline