A code that will determine the average of the class and display it. I have this
ID: 3906894 • Letter: A
Question
A code that will determine the average of the class and display it. I have this so far to go with my class.
import java.io.*;
public class TestAverages{
public static void main ( String[] args ) throws IOException {
double average;
int studentNumber = 1;
int getAverage;
TestScoreReader scoreReader = new TestScoreReader( "Grades.csv" );
while( scoreReader.readNextLine()){
average = scoreReader.getAverage();
System.out.println( " Average for student " + studentNumber + " is " + average );
studentNumber++;
average= getAverage;
average = ( studentNumber++ / 5 );
System.out.printf( "The average of the class is: ");
}
scoreReader.close();
System.out.println( " No more scores. " );
}
}