In this assignment you will write a program to find the mean of a list of grades stored in a file. The file will consist of a sequence of integers. The first integer is the number of integers in the file. You can assume that there are exactly the right number of grades in the file. You should read the name of the file from the user. Implementation You should read the grades into an array, then print out the grades followed by the average of the grades.

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter8: Arrays
Section: Chapter Questions
Problem 9PE
icon
Related questions
Question
100%

Please solve this Java problem

Assignment
In this assignment you will write a program to find the mean of a list of grades stored in a file.
The file will consist of a sequence of integers. The first integer is the number of integers in
the file. You can assume that there are exactly the right number of grades in the file. You
should read the name of the file from the user.
Implementation
You should read the grades into an array, then print out the grades followed by the average of
the grades.
Sample File (named john_smith_grades.txt)
96
97
87
92
97
Sample Output
What file do you want me to read? john_smith_grades.txt
0 : 96
1: 97
2: 87
3: 92
4 : 97
The average is 93.8.
Transcribed Image Text:Assignment In this assignment you will write a program to find the mean of a list of grades stored in a file. The file will consist of a sequence of integers. The first integer is the number of integers in the file. You can assume that there are exactly the right number of grades in the file. You should read the name of the file from the user. Implementation You should read the grades into an array, then print out the grades followed by the average of the grades. Sample File (named john_smith_grades.txt) 96 97 87 92 97 Sample Output What file do you want me to read? john_smith_grades.txt 0 : 96 1: 97 2: 87 3: 92 4 : 97 The average is 93.8.
Expert Solution
steps

Step by step

Solved in 2 steps with 2 images

Blurred answer
Knowledge Booster
Computational Systems
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage