Oh wait, no, that's not a problem. I see what it is you're doing. hmm... I don't understand why you're getting the results you are. It seems to me that you should be getting A's almost all the time because you keep adding to grades, and never find an average grade.
This should work:
public void addGrade(double x)
{
grade = grade * numTest + x;
numTest++;
grade /= numTest;
if (grade >= 90)
{
gpa = 4;
}
else if (grade >= 80)
{
gpa = 3;
}
else if (grade >= 70)
{
gpa = 2;
}
else if (grade >= 60)
{
gpa = 1;
}
else
{
gpa = 0;
}
}