Question: Write a program in JAVA CODE ONLY that will grade a set of Multiple Choice tests. The test has 20 questions and there are 20

Write a program in JAVA CODE ONLY that will grade a set of Multiple Choice tests. The test has 20 questions and there are 20 students in the class. There will be two parts to the input. First, you must read the test answers from a file into a 2D array. Each row of the array will hold the answers given by one student so the element at subscript 0 in the row of the array will hold the answer to the first question, the element at subscript 1 in the row will hold the answer to the second question, and so on. The answers given by each student will be on a separate line in the input file, so there will be 20 answers on each line and there will be 20 lines. The second part of the input is the answer key the list of the correct test answers. The correct answers will be on one line. They should be read into a 1D array. (Note: The 21st line in the input file will contain the answer key.) After reading the test answers and the answer key, your program should grade each test by comparing each answer with the answer key and counting the number of correct answers. The number of correct answers for each test should be printed to an output file along with the corresponding grade for that test. Each correct answer is worth 5 points. The output file should be in report format. You should also keep a running total of the sum of the student grades. At the end of the report list, the average grade obtained on this test by the 20 students. 1) You will use an input file to read the values into the array. 2) You will send the results to an output file. 3) You will use methods with parameters in your program. Input data file:

1 C C D D A B C C B A B C D A D C C B D A

2 BD A A C A B A C D B C D A D C C B D A

3 B D D D C A B A C D B C D A D C C B D A

4 B C A A C A B A C D B C A A D C C B D A

5 BC A C C A C A C C B C D A D C C B D D

6 A D A A C A B D A D B A D A D C B B D C

7 BD A A C A B A C D B C D A D C C B D A

8 D D A A C A B A C D B C D A D C C B D A

9 BD D D A A A A C D B C D A B C C B D A

10 BD A A C A B A C D B C D A D C C B D A

11 BD A A C A B A C A B C D A D C C B D A

12 B D A D C A B A D D B C D A D C C B D A

13 B D A A C A B A B D B C D A D A A B D A

14 B D A A C A B A C D B C D A D C C B D A

15 B D A A C A B A C D B B C A C B B B D B

16 B D A A C A B A C D B C D A D C C B D A

17 B D A A C C C C C D B C D A D C C B D A

18 B D D A C A B A C D B C D A D B B B D A

19 B A D A C A B A B A B C D A D C C B D A

20 BD A A C A B A C D B C D A D C C B D A

21 B D A A C A B A C D B C D A D C C B D A

EXAMPLE OF OUTPUT:

STUDENT test RESULTS

Student Number # Correct Answers Grade

1 1 0 ` 50

2 15 75

. . .

. . .

Average grade obtained on this test: 80

By Your Name

_________________________________________________________________________

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!