Question: Write a program that reads a file named gradebook.txt containing information about a student's grade. The information include the first name and three exam

Write a program that reads a file named "gradebook.txt" containing information about a student's grade. The information include the first name and three exam scores.
File Format
The first line contains the number of exams.
The second line contains the name, and the exam scores.
Sample input file
3,
Lisa 100,95,80
You will need to create a new file in onlinegdb and name it "gradebook.txt". There's a file icon on the top left of the code editor. Click on this icon to create a new file. If you do not see this icon, it's because a red ribbon with the message that you haven't confirmed your email is blocking it. Click the x on the red ribbon to the far right.
The output of the program is a table consisting of a name column, average, and grade column. The grade column is optional.
Sample run
\table[[Nane,Avg Grade],[Lisa,91.67],[A,]]
Here's the logic to solving the problem:
Read the number of exams
Read the name
Read the three exams using a loop and compute the total
Compute the average
Compute the letter grade.
Print the name, average, and letter grade.
Draft version -
L
hat()
Rum
Mainjava
import
java.io. ;
import java.util.";
class Main {
public static void main(string[] args)
{
throws IoException
Scanner s= new Scanner(new File("gradebook.txt"));
//Read the number of exans
//Read the name
//Read the exam scores and campute the fotal
//Compute the average
//compute letter grade
//print name, average, and letter grade
s.close();All Book68Home/Microsoft 365DebugStop. SaveAsubmit1235[6],[7]8911121314151516161718192021...Program finished with exit code 1Press ExrarR to exit console. []
 Write a program that reads a file named "gradebook.txt" containing information

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!