Write a program that reads the student information from a tab separated values (tsv) file. The program then creates a text file that records the course grades of the students. Each row of the tsv file contains the Last Name, First Name, Midterm1 score, Midterm2 score, and the Final score of a student. A sample of the student information is provided in StudentInfo.tsv. Assume the number of students is at least 1 and at most 20. The program performs the following tasks:

Read the file name of the tsv file from the user.
Open the tsv file and read the student information.
Compute the average exam score of each student.
Assign a letter grade to each student based on the average exam score in the following scale:
A: 90 =< x
B: 80 =< x < 90
C: 70 =< x < 80
D: 60 =< x < 70
F: x < 60
Compute the average of each exam.
Output the last names, first names, exam scores, and letter grades of the students into a text file named report.txt. Output one student per row and separate the values with a tab character.
Output the average of each exam, with two digits after the decimal point, at the end of report.txt. Hint: Use the precision sub-specifier to format the output.
Ex: If the input of the program is:

StudentInfo.tsv
and the contents of StudentInfo.tsv are:

Barrett Edan 70 45 59
Bradshaw Reagan 96 97 88
Charlton Caius 73 94 80
Mayo Tyrese 88 61 36
Stern Brenda 90 86 45
the file report.txt should contain:

Barrett Edan 70 45 59 F
Bradshaw Reagan 96 97 88 A
Charlton Caius 73 94 80 B
Mayo Tyrese 88 61 36 D
Stern Brenda 90 86 45 C

Averages: Midterm1 83.40, Midterm2 76.60, Final 61.60...The white space is not correct. import java.util.Scanner;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.PrintWriter;
import java.io.IOException;

public class LabProgram {
public static void main(String[] args) throws IOException {
// Create a Scanner object for reading user input
Scanner sc = new Scanner(System.in);
System.out.println("Enter the filename:");
String filename = sc.nextLine();

// Open the file with the given filename
FileInputStream fis = new FileInputStream(filename);
Scanner fileScanner = new Scanner(fis);

// Create a PrintWriter for writing to a file
FileOutputStream fos = new FileOutputStream("report.txt");
PrintWriter pw = new PrintWriter(fos);

// Variables for storing the total scores and the number of students
double totalMidterm1 = 0, totalMidterm2 = 0, totalFinal = 0;
int count = 0;

// Read the file line by line
while (fileScanner.hasNextLine()) {
String line = fileScanner.nextLine();
String[] parts = line.split("\t");

// Parse the student information from the line
String lastName = parts[0];
String firstName = parts[1];
int midterm1 = Integer.parseInt(parts[2]);
int midterm2 = Integer.parseInt(parts[3]);
int finalScore = Integer.parseInt(parts[4]);

// Update the total scores and the student count
totalMidterm1 += midterm1;
totalMidterm2 += midterm2;
totalFinal += finalScore;
count++;

// Compute the average score and assign a letter grade
double average = (midterm1 + midterm2 + finalScore) / 3.0;
char grade;

if (average >= 90) {
grade = 'A';
} else if (average >= 80) {
grade = 'B';
} else if (average >= 70) {
grade = 'C';
} else if (average >= 60) {
grade = 'D';
} else {
grade = 'F';
}

// Write the student information and the grade to the file
pw.println(lastName + "\t" + firstName + "\t" + midterm1 + "\t" + midterm2 + "\t" + finalScore + "\t" + grade);
}

// Write the average scores to the file
pw.printf("Averages: Midterm1 %.2f, Midterm2 %.2f, Final %.2f", totalMidterm1 / count, totalMidterm2 / count, totalFinal / count);

// Close the PrintWriter and the Scanners
pw.close();
fileScanner.close();
sc.close();
}
}

Write a program that reads the student information from a tab separated values tsv file The program then creates a text file that records the course grades of t class=