Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Introduction To Data Mining

Authors: Pang Ning Tan, Michael Steinbach, Vipin Kumar

1st Edition

321321367, 978-0321321367

More Books

Students also viewed these Databases questions