I got it to compile and run making 3 changes. Whether it does what you want is another matter! 
Local variables must be initialised with a value before being accessed. So,
int resultClass;
should be
int resultClass = 0;
and
double sf1, sf2, sf3, sf4, sf5, sf6;
should be
double sf1 = 0, sf2 = 0, sf3 = 0, sf4 = 0, sf5 = 0, sf6 = 0;
And you need to replace main with setup() for Processing purposes. It doesn’t return anything.
void setup(){
println("\nResult: ", calculate());
}