The attached file, ScoreData-1.txt, is an input file that holds student answers for a test. You need to have your program read this text file and do the following:
Calculate each student's score based upon the following scoring method:
Each correct answer is +5 pts
Each incorrect answer is -2 pts
Each non-answer (blank) is worth 0 pts
Print out to a file called "results.txt" the following items in a nicely arranged format.
The overall Average
The highest score
Each individual's ID and Score
Below is the input file which I have saved as a text file ScoreData.txt
ABC54301 TFTFTFTTTTF TFTFTFTT
ABC54311 TFTTFFFFTT FTFTFTFTT
ABC54326 TFFT FFFFFFFFFTFTFTT
ABC54335 TFFTFFT TTFFTFTFTFTT
ABC54344 TFFTFF TTTFFTF FTFTT
ABC54350 TFFTFFTTTTTTTFTFT TT
Description of ScoreData
Please read the 2nd attached file, inputFile.pdf, which explains the format for the input file.-
This file is
a text file that holds an answer key and
student answers to a series of True/False questions
on an exam. The format for the file is as follows:
The first line of the file will always hold the answers to all of the questions sequentially. Correct
answers to each question are either
“T” for true or "F”for false.
All Remaining rows follow the following format: Student ID number followed by a SINGLE SPACE then actual student answers to the test questions
Please note that some students did not answer all questions.
A blank is included wherever a student did
not answer a question.
Also, the number of students that took the exam is not known before you read the file for the first time.
Attach all of your .java files to this assignment for grading.
This program needs to be done in ONLY Notepad++ , in Java.
I believe these are all that I will be using for this program, I need to read the data in from the ScoreData.txt file and create strings and substrings, and store the answers to the test, student id, and student answers in arrays. (I cannot use an arraylist for this program) I need to be able to print the final results to a result.txt file that will be it's own separate file?
Some examples of the formatting are below
String line = inputStream.nextLine();
my try catch block will have
Scanner inputStream = new Scanner(new File(fileName)
I also know that I have to use delimiter to be able to read in and correctly store some of the data(student answers) since some did not answer all of the questions.
I have also attached my file of Project3.java to show where I am at (which is not far, and no where near being correct) I need help.
If any other questions on what I am wanting please feel free to ask so that I can make sure that this would get done correctly.Attachments