E208 Required Methods Not Available
[Previous]  [Next] 
|
User Manual [Previous]  [Next] E208 Required Methods Not AvailableUmple semantic error related to not having required methods of traits in classesTraits need to have required methods in order to provide the functionality they have designed to provide. These required methods can provide special functionality or be a way of accessing states (attributes) in host classes. This error is raised when a required method is not available. Example// In this example, the required method // "FinalResult()" in Trait "T" is // not satisfied by class "A". class A{ isA T; } trait T{ Integer FinalResult(); void calculate(){ //method FinalResult() will be used here; } } Load the above code into UmpleOnline Solution to The Above So the Message No Longer Appears// In this example, the require method // "FinalResult()" in Trait "T" is // satisfied by class "A". class A{ isA T; internal Integer x; Integer FinalResult(){ return x/100; } } trait T{ Integer FinalResult(); void calculate(){ //method FinalResult() will be used here; } } Load the above code into UmpleOnline |