title: Homework: Class to record Student Grades
body: <p><strong>Homework Question</strong></p>
  
  <p>Write a grading program for a class with the following grading policies:
  a) 3 quizzes graded out of 10 points, weighted 25%
  b) 1 midterm graded out of 100 points, weighted 35%
  c) 1 final graded out of 100 points, weighted 40%
  Your class requires a set of accessor and mutator methods, full constructor, default constructor, equals method, and a to String method. The class should have instance variables for the quizzes, midterm, and final only.
  Then, write a tester program that should read the student's scores and output the student's scores and the student's record. as well as the student's overall numeric score for the entire course and final letter grade. </p>
  
  <p>I keep getting errors no matter what I do! All the errors are "error: cannot find symbol" I would be very glad if someone could help me figure out what is wrong. I have spent hours on this.</p>
  
  <p>These are my methods...</p>
  
  <pre><code>import java.util.Scanner;
  
  public class StudentRecord
  {
      /***DECLARATIONS**/
  
      private int quizScore1;
      private int quizScore2;
      private int quizScore3;            
      private int midtermScore;
      private int finalScore;
  
      /***ACCESSOR METHODS**/
  
      public int getQuizScore()
      {
          return quizScore1;
          return quizScore2;
          return quizScore3;
      }
  
      public int getMidtermScore()
      {
          return midtermScore;
      }
  
      public int getFinalScore()
      {
          return finalScore;
      }
  
      /***MUTATOR METHODS**/
  
      public void setQuizScore(int quizScore1, int quizScore2, int quizScore3)
      {
          if (quizScore1 &lt; 0 || quizScore1 &gt; 10)
          {
              System.out.println("Error: Invalid Quiz Grade"); 
          }
          if (quizScore2 &lt; 0 || quizScore2 &gt; 10)
          {
              System.out.println("Error: Invalid Quiz Grade");
          }
          if (quizScore3 &lt;0 || quizScore3 &gt; 10)
          {
              System.out.println("Error: Invalid Quiz Grade");
          }
          else
          {
              this.quizScore1 = quizScore1;
              this.quizScore2 = quizScore2;
              this.quizScore3 = quizScore3;
          }
      }
  
      public void setMidtermScore(int midtermScore)
      {
          if (midtermScore &lt; 0 || midtermScore &gt; 100)
          {
              System.out.println("Error: Invalid Midterm Score");
          }
          else
          {
              this.midtermScore = midtermScore;
          }
      }
  
      public void setFinalScore(int finalScore)
      {
          if (finalScore &lt; 0 || finalScore &gt; 100)
          {
              System.out.println("Error: Invalid Final Score");
          }
          else
          {
              this.finalScore = finalScore;
          }
      }
  
      /***OTHER METHODS***/
  
      public void studentRecord()
      {
          quizScore1 = 0;
          quizScore2 = 0;
          quizScore3 = 0;
          midtermScore = 0;
          finalScore = 0;
      }
  
      public void studentRecord(int quizScore1, int quizScore2, int quizScore3, int midtermScore, int finalScore)
      {
          System.out.println("Quiz Score 1: " + quizScore1);
          System.out.println("Quiz Score 2: " + quizScore2);
          System.out.println("Quiz Score 3: " + quizScore3);
          System.out.println("Midterm Score: " + midtermScore);
          System.out.println("Final Score: " + finalScore);
      }
  
      public boolean equals (StudentRecord otherStudentRecord)
      {
          return (quizScore1 == otherStudentRecord.quizScore1);
          return (quizScore2 == otherStudentRecord.quizScore2);
          return (quizScore3 == otherStudentRecord.quizScore3) ;
          return (midtermScore == otherStudentRecord.midtermScore);
          return (finalScore == otherStudentRecord.finalScore);
      }
  
      public int getGradeScore()
      {
          int gradeScore;
  
          gradeScore = (((quizScore1 + quizScore2 + quizScore3) / 3) / 10 * 25) + (midtermScore / 100 * 35) + (finalScore / 100 * 40); 
      }
  
      public char getLetterGrade()
      {
          int gradeScore;
          char letterGrade;
  
          if (gradeScore &gt;= 90 &amp;&amp; gradeScore &lt;= 100)
          {
              return 'A';
          }
          else if (gradeScore &gt;= 80 &amp;&amp; gradeScore &lt;= 89)
          {
              return 'B';
          }
          else if (gradeScore &gt;= 70 &amp;&amp; gradeScore &lt;= 79)
          {
              return 'C';
          }
          else if (gradeScore &gt;= 60 &amp;&amp; gradeScore &lt;= 69)
          {
              return 'D';
          }
          else 
          {
              return 'F';
          }
      }
  
      public String toString()
      {
          return ("Grade Score is " + gradeScore + "and letter grade is " + letterGrade);
      }
  
  }
  </code></pre>
  
  <p>...and this is my tester program...</p>
  
  <pre><code>import java.util.Scanner;
  
  public class CalculatingStudentGrade
  {
      public static void main(String[] args)
      {
          Scanner keyboard;
          int quizScore1, quizScore2, quizScore3, midtermScore, finalScore;
  
          keyboard = new Scanner(System.in);
  
          System.out.println("Enter Quiz 1 score:");
          quizScore1 = keyboard.nextInt();
          System.out.println("Enter Quiz 2 score:");
          quizScore2 = keyboard.nextInt();
          System.out.println("Enter Quiz 3 score:");
          quizScore3 = keyboard.nextInt();
  
          StudentRecord.getQuizScore();
          StudentRecord.getMidtermScore();
          StudentRecord.getFinalScore();
  
          StudentRecord.setQuizScore();
          StudentRecord.setMidtermScore();
          StudentRecord.setFinalScore();
  
          StudentRecord.StudentRecord();
          StudentRecord.getGradeScore();
          StudentRecord.getLetterGrade(); 
      }
  }
  </code></pre>