Question: Task: Writ a Java Program that will use students grades stored in grades.txt file with the following format: I. Calculate the students averages. Print all


Objective: The purpose of this assignment is to practice file 1/0 along with nested conditional loops. Task: Writ a Java Program that will use students' grades stored in "grades.txt" file with the following format: 1. Calculate the students' averages. Print all the students' IDs with their averages in another file and name it "averages.txt". II. Calculate and print the class overall total average at the last line of the file "averages.txt". III. Prompt the student to enter his/her ID. Find the corresponding student first and last names from another input file named" StudentsList.txt". IV. Find the student's average from the file that you have created "averages.txt". V. Print the student's first name, last name, ID and average in a file named with the student's first name and last 3 digits from his ID. "firstName231. txt". An example is shown below. Input files: 1234 8765 4444 3333 5555 7777 1111 1212 9898 1015 99 88 66 88 67 90 92 92 76 92 90 77 87 77 91 91 83 76 100 94 78 88 86 76 92 66 89 76 100 87 67 76 82 77 90 67 88 78 100 100 89 89 83 79 92 65 88 78 99 90 80 97 84 77 93 99 89 65 85 71 94 62 87 84 72 91 63 87 79 100 67 95 90 98 89 73 92 77 80 68 82 72 100 70 93 72 89 70 100 88 77 100 88 grades. Ext 1234 Sara 8765 Ahmed 4444 Mona 3333 Khalid 5555 Nada 7777 Mohammed 1111 Mariam 1212 Hamed 9898 Hala 1015 Ammar studentsList.EXE Mahir SATS Rashid Mohammed Ali Ahmed Mahmood AlAli Mustafa Abdalla Sample output files: averages.bit x e Console Mariam 11.bt 1|1234 93 28765 84 34444 80 43333 85 55555 73 67777 91 7 1111 72 8 1212 86 99898 74 10 1015 98 11 Total Average is 84 averages.txt Console
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
