Helper methods are used in order to encapsulate different parts of computation so that your code becomes more readable. In my example, you encapsulate the entire computation within computeWithAhelper() method. The advantage is that you can completely forget about computation details during writing your output loop. You can just concentrate on your loop details and have a guarantee, that the helper method would compute whatever you want correctly. And when the loop is done, you can, in turn, totally forget about it and concentrate on the computation details.
So that your main method would look like follows:
public static void main(String[] args)
{
for(double c = 280; c <= 400; c += 5) {
String earthsurfTemp = computeWithAhelper(c);
System.out.println("C = " + c + "; temp = " + earthsurfTemp);
}
}
All the computations, formulas, constants etc. are in the computeWithAhelper().