Question: Write a method called computeScores that receives as it's parameter a String variable which is the name of a file. The file contains a list

 Write a method called computeScores that receives as it's parameter a

Write a method called computeScores that receives as it's parameter a String variable which is the name of a file. The file contains a list of test scores which are all doubles and each is separated by a new line. The method will print information to System.out so there is no return type. The method declaration should be the following: public static void computeScores (String fileName) throws FileNotFoundException f IYour code here. . The method should do the following: Check to see if the file exists and only continue if it does Compute the average and count of the test scores that are in the file Output the result to the screen For example, if the file contained the following: 87.0 95.3 74.6 Then the program should output: Read 3 test scores, average score is 85.63 You are only required to write the method, not the whole program and not an input file

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!