title: Can could someone please explain to me why these errors are coming up when I compile this code?
body: <pre><code>class GradeCalculator
  {
  //instance variables
  String name;
  double q1;
  double q2;
  double q3;
  double q4;
  double q5;
  double midterm;
  double finalExam;
  double finalGrade;
  
  //constructor
  GradeCalculator (String studentName, double quizOne, double quizTwo, double quizThree, double quizFour, double quizFive, double midterm, double finalExam)
  {
  name = studentName;
  q1 = quizOne;
  q2 = quizTwo;
  q3 = quizThree;
  q4 = quizFour;
  q5 = quizFive;
  }
  
  //method
  public double calculator (double q1, double q2, double q3, double q4, double q5, double midterm, double finalExam)
  {
  finalGrade = ((((q1 + q2 + q3 + q4 + q5) / 50) * 100) / 2 ) + (midterm / 4 ) + (finalExam / 4);
  return finalGrade;
  
  if (90 &lt;= finalGrade &amp;&amp; finalGrade &lt;= 100)
  </code></pre>
  
  <p>Right here is the first error. Java says that this is an unreachable statement and I have no clue what that means or how to fix it.</p>
  
  <pre><code>{
  System.out.println (name + "'s final grade is " + finalGrade + " and " + name + "'s letter grade is A.");
  }
  else
  {
  if (80 &lt;= finalGrade &amp;&amp; finalGrade &lt;= 89)
  {
  System.out.println (name + "'s final grade is " + finalGrade + " and " + name + "'s letter grade is B.");
  }
  else
  {
  if (70 &lt;= finalGrade &amp;&amp; finalGrade &lt;= 79)
  {
  System.out.println (name + "'s final grade is " + finalGrade + " and " + name + "'s letter grade is C.");
  }
  else
  {
  if (60 &lt;= finalGrade &amp;&amp; finalGrade &lt;= 69)
  {
  System.out.println (name + "'s final grade is " + finalGrade + " and " + name + "'s letter grade is D.");
  }
  else
  {
  if (finalGrade &lt;= 59)
  {
  System.out.println (name + "'s final grade is " + finalGrade + " and " + name + "'s letter grade is F.");
  }
  }
  }
  }
  }
  }
  }
  
  public class GradeCalculatorTester
  {
  public static void main (String[]args)
  {
  GradeCalculator student1 = new GradeCalculator ("Eddie Cardona", 8, 7, 9, 10, 8, 87, 92);
  GradeCalculator student2 = new GradeCalculator ("Aleksandr Marchant", 6, 6, 6, 7, 8, 63, 72);
  GradeCalculator student3 = new GradeCalculator ("James Wilson", 7, 8, 8, 7, 5, 75, 80);
  GradeCalculator student4 = new GradeCalculator ("Jordan Matthewson", 10, 9, 10, 8.5, 9, 94, 96);
  GradeCalculator student5 = new GradeCalculator ("Seamus O'Dorherty", 5, 6, 9, 7, 7, 74, 80);
  
  student1.calculator(q1, q2, q3, q4, q5, midterm, finalExam);
  student1.calculator(q1, q2, q3, q4, q5, midterm, finalExam);
  student1.calculator(q1, q2, q3, q4, q5, midterm, finalExam);
  student1.calculator(q1, q2, q3, q4, q5, midterm, finalExam);
  student1.calculator(q1, q2, q3, q4, q5, midterm, finalExam);
  </code></pre>
  
  <p>The rest of the errors happen in the section above when the objects call the method.
      }
      }
  I have no idea why this won't work. When I compile this I end up with 37 errors. Help please! I am using a Java pack (j2sdk1.4.2_19) to do this.</p>