I am attempting to read each integer from an infile and passing that on to the method adScore which determines the letter grade, and total count of all the grades and the highest exam score and lowest exam score. But my while loop when doing the for loop isn't pulling in the data from the infile as I am debugging it after the for loop doing a system.out.print. And what returns are just the numbers 0-29 which is my counter in the loop. Can assist me as to what I am doing wrong so that I can pull in the grade scores from the infile?
Regards.
while(infile.hasNextInt())
{
for(int i=0; i <30; i++)//<-- it keeps looping and not pulling the integers from the file.
{
System.out.println(""+i);//<--- I placed this here to test what it is pulling in and it is just counting
//the numbers 0-29 and printing them out. How do I get each data from the infile to store
exam.adScore(i);//determines the count of A, B, C, D, F grades, total count, min and max
}
}