LittleRedHat
Instructor
Instead of returning 1 - 4 I would like this to return "Do this", "Do that", "Do the other", "Do nothing". The problem is I don't know/can't work out how. Help would be appreciated.
WTA
LRH
/*
Java Class for applying rules relative to the result
of the range and average calulation
*/
public class SampleRulesClass{
private int matchRule;
public int GetRule (double rangeAvResult){
matchRule=0;
if (rangeAvResult <=0.1)
matchRule=1;
else if (rangeAvResult >0.1 && rangeAvResult<=0.2)
matchRule=2;
else if (rangeAvResult >0.2 && rangeAvResult<=0.3)
matchRule=3;
else if (rangeAvResult >0.3)
matchRule=4;
return matchRule;
}
}
WTA
LRH
/*
Java Class for applying rules relative to the result
of the range and average calulation
*/
public class SampleRulesClass{
private int matchRule;
public int GetRule (double rangeAvResult){
matchRule=0;
if (rangeAvResult <=0.1)
matchRule=1;
else if (rangeAvResult >0.1 && rangeAvResult<=0.2)
matchRule=2;
else if (rangeAvResult >0.2 && rangeAvResult<=0.3)
matchRule=3;
else if (rangeAvResult >0.3)
matchRule=4;
return matchRule;
}
}