Help don't know what to do, why i'm getting this error.
Score.java:44: cannot find symbol
symbol : class InvalidTestScore
location: class Score
catch (InvalidTestScore e)
^
1 error
// George Beazer
import javax.swing.*;
import javax.swing.JOptionPane;
public class Score
{
public static void main(String[] args)
{
int numberofTests = 0;
double[] grade = new double[numberofTests];
double startgrade = 0;
int x = 1 ;
String strInput;
// Get how many tests are used
strInput = JOptionPane.showInputDialog(null, "How many tests do you have? ");
numberofTests = Integer.parseInt(strInput);
grade = new double[(int) numberofTests];
do
{
for (int index = 0; index < grade.length; index++)
{
strInput = JOptionPane.showInputDialog(null, "Enter Test Score." + (index + 1));
grade[index] = Double.parseDouble(strInput);
if (grade[index] < 0 || grade[index] > 100 )
{
try
{
x=1;
}
catch (InvalidTestScore e)
{
e.printlnStackTrace();
System.out.println ("Choose a test score between 0 and 100");
}
}
else
{
x=2;
}
{
System.out.println ("Choose a test score between 0 and 100");
}
}
}
while (x==1);
for (int index = 0; index < grade.length; index++ )
{
startgrade += grade[index];
}
double average = startgrade/grade.length;
System.out.println("The average is: " + average);
}
}