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...


In Java please,


Write a program that reads the student information from a tab separated values (tsv) file. The program then creates a text file that records<br>the course grades of the students. Each row of the tsv file contains the Last Name, First Name, Midterm1 score, Midterm2 score, and the<br>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<br>and at most 20. The program performs the following tasks:<br>• Read the file name of the tsv file from the user.<br>• Open the tsv file and read the student information.<br>Compute the average exam score of each student.<br>Assign a letter grade to each student based on the average exam score in the following scale:<br>o A: 90 =< x<br>o B: 80 =< x < 90<br>o C: 70 =< x < 80<br>o D: 60 =< x < 70<br>o F:x < 60<br>Compute the average of each exam.<br>Output the last names, first names, exam scores, and letter grades of the students into a text file named report.txt. Output one<br>student per row and separate the values with a tab character.<br>• 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<br>to format the output.<br>Ex: If the input of the program is:<br>StudentInfo.tsv<br>and the contents of StudentInfo.tsv are:<br>Barrett<br>Edan<br>70<br>45<br>59<br>Bradshaw<br>Reagan<br>96<br>97<br>88<br>Charlton<br>Caius<br>73<br>94<br>80<br>Мayo<br>Tyrese<br>88<br>61<br>36<br>Stern<br>Brenda<br>90<br>86<br>45<br>the file report.txt should contain:<br>Barrett<br>Edan<br>70<br>45<br>59<br>F<br>Bradshaw<br>Reagan<br>96<br>97<br>88<br>А<br>Charlton<br>Caius<br>73<br>94<br>80<br>В<br>Мayo<br>Tyrese<br>88<br>61<br>36<br>D<br>Stern<br>Brenda<br>90<br>86<br>45<br>C<br>Averages: Midterml 83.40, Midterm2 76.60, Final 61.60<br>

Extracted text: 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: o A: 90 =< x="" o="" b:="" 80="">< x="">< 90="" o="" c:="" 70="">< x="">< 80="" o="" d:="" 60="">< x="">< 70="" o="" 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="" мayo="" 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="" а="" charlton="" caius="" 73="" 94="" 80="" в="" мayo="" tyrese="" 88="" 61="" 36="" d="" stern="" brenda="" 90="" 86="" 45="" c="" averages:="" midterml="" 83.40,="" midterm2="" 76.60,="" final="">
LabProgram.java<br>Load default temp<br>1 import java.util.Scanner;<br>2 import java.io.FileInputStream;<br>3 import java.io.FileOutputStream;<br>4 import java.io.PrintWriter;<br>5 import java.io.I0Exception;<br>6<br>7 public class LabProgram {<br>public static void main(String[] args) throws IOException {<br>Scanner scnr = new Scanner(System.in);<br>8<br>9<br>10<br>11<br>/* TODO: Declare any necessary variables here. */<br>12<br>13<br>14<br>/* TODO: Read a file name from the user and read the tsv file here. */<br>15<br>16<br>* TODO: Compute student grades and exam averages, then output results to a text file here.<br>}<br>17<br>18<br>

Extracted text: LabProgram.java Load default temp 1 import java.util.Scanner; 2 import java.io.FileInputStream; 3 import java.io.FileOutputStream; 4 import java.io.PrintWriter; 5 import java.io.I0Exception; 6 7 public class LabProgram { public static void main(String[] args) throws IOException { Scanner scnr = new Scanner(System.in); 8 9 10 11 /* TODO: Declare any necessary variables here. */ 12 13 14 /* TODO: Read a file name from the user and read the tsv file here. */ 15 16 * TODO: Compute student grades and exam averages, then output results to a text file here. } 17 18

Jun 05, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here