You are asked to write a Java program to maintain student records in a subject. The program reads all students data (i.e., IDs, names, assignment and examination marks) in a text file, and print out a table containing some simple statistics (i.e., average)
A general format of input text file depicts below:
Student ID, Student name, marks for assignment 1, percentage of assignment 1, marks for assignment 2, percentage of assignment 2,
[Student ID], [Student Name], Asg 1, 10, Asg 2, 10, Midterm, 40, Final, 40 01234567, Timture Choi, 99.5, 97, 100.0, 99.0 02345678, Elaine Tam, 89.5, 88.5, 99.0, 100
The first row denotes the names of all assessments. Then, each student record presents in a line. All fields are separated by a comma.
You may assume that there is no comma in between surname and first name. The length of student id is fixed at 8 characters long, whilst the length of student name is fixed at 20 characters long.
Here is a sample output from the input file shown above.
ID Name Asg 1 Asg 2 Midterm Final Overall 01234567 Timture Choi 99.50 97.00 100.00 99.00 99.30 02345678 Elaine Tam 89.50 88.50 99.00 100.00 97.40 Average: 94.50 92.75 99.50 99.50 98.30
Your program should be able to process as many as possible students’ data, which are all contained in one input file as shown in the example. You have to use array data type in your program. You may use System.out.printf() statement to produce the formatted output. In addition to output student records, your program should calculate the averages for each individual assessment. Please be reminded that all numbers are displayed with 2 decimal places.
- Zip your programming files (java source code and class file), and name the zip file as your student’s ID, for example 20123456.zip.
- Make a screen dump for the program result.
- Upload your submission (1 and 2) on Canvas.
- Late submission is not allowed.
- Plagiarism (Copying) is a serious concern. Students might search for information on the Internet and “Copy & Paste” it directly in their assignments. Hence, a strict rule is applied that MORE THAN SEVEN WORDS copied from a source is considered as a cheating. The minimum penalty is zero marks for the particular assignment.