uOttawaUniversity of Ottawa - Canadas University
list of dots

Umple User Manual    [Previous]   [Next]   

Loading

E208 Required Methods Not Available

Umple semantic error related to not having required methods of traits in classes

Traits 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 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

 

Another Example

// 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