I'm doing the dreaded grade average problem for my class and have run into MANY hiccups, but this one seems to be the major one. I'm not able to pull the calculated average in my method to the toString. Here's the one method:
public void average() {
total = (((quiz1 + quiz2) / 40 * 25) + (midterm / 100 * 35) + (finalExam / 100 * 40));
DecimalFormat dec = new DecimalFormat("#.0");
dec.format(total);
return;
}
And I'm trying to get it here:
public String toString(){
return ("Grade Report:\n" ....+ "Total Score " + total + "\n" ....);