Having trouble with this problem:
Create a program called CalculateGPA.java that asks the user to enter grades for each course of a given semester (such as A, B, C, D, F). Enter X to stop entering grades. The program should then calculate the GPA for the semester. Assume that each course has the same number of credit hours. Use the NumberFormat class to format the GPA to two decimal places. Use the Scanner class for input and the command window for output. Entering grades should be handled by one method and displaying the GPA by a different method. Use a switch statement to assign grade points for different grades.
This is what I have so far followed by my error message when compiling.
import java.util.Scanner;
public class NetPay
{
public void GetGrades ( ) {
TextReader console = new TextReader ( );
gradetotal = 0;
count = 0;
System.out.print ("\n\nPlease enter your grades below, using"
+ " upper and/or lower case. Non-grade characters will"
+ " be disregarded and you should enter 'x' or 'X' to"
+ " exit.");
System.out.print ("\nList of grades: ");
grade = console.readChar ( );
while (grade !='x' || grade!='X') {
if (grade == 'A' || grade == 'a') {
gradetotal += 4;
count++;
}
if (grade == 'B' || grade == 'b') {
gradetotal += 3;
count++;
}
if (grade == 'C' || grade == 'c') {
gradetotal += 2;
count++;
}
if (grade == 'D' || grade == 'd') {
gradetotal += 1;
count++;
}
if (grade == 'F' || grade == 'f') {
gradetotal += 0;
count++;
}
if (grade == 'X' || grade == 'x')
break;
}
}
public double CalculateGPA ( )
{
return (gradetotal/(double)count);
}
ERROR MESSAGE:
----jGRASP exec: javac CalculateGPA.java
CalculateGPA.java:53: error: reached end of file while parsing
}
^
1 error
----jGRASP wedge2: exit code for process is 1.
----jGRASP: operation complete.

