Question: char[] answerKeyFromChars = { 'D', 'B', 'D', 'C', 'C', 'D', 'A', 'E', 'A', 'D' } ; char[][] studentsAnswersFromChars = { { 'A', 'B', 'A', 'C',
![char[] answerKeyFromChars = { 'D', 'B', 'D', 'C', 'C', 'D', 'A',](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f30fb5dd050_30166f30fb541f3a.jpg)
char[] answerKeyFromChars = { 'D', 'B', 'D', 'C', 'C', 'D', 'A', 'E', 'A', 'D' } ; char[][] studentsAnswersFromChars = { { 'A', 'B', 'A', 'C', 'C', 'D', 'E', 'E', 'A', 'D' }, { 'D', 'B', 'A', 'B', 'C', 'A', 'E', 'E', 'A', 'D' }, { 'E', 'D', 'D', 'A', 'C', 'B', 'E', 'E', 'A', 'D' }, { 'C', 'B', 'A', 'E', 'D', 'C', 'E', 'E', 'A', 'D' }, { 'A', 'B', 'D', 'C', 'C', 'D', 'E', 'E', 'A', 'D' }, { 'B', 'B', 'E', 'C', 'C', 'D', 'E', 'E', 'A', 'D' }, { 'B', 'B', 'A', 'C', 'C', 'D', 'E', 'E', 'A', 'D' }, { 'E', 'B', 'E', 'C', 'C', 'D', 'E', 'E', 'A', 'D' } } ; char[] answerKeyFromString = "DBDCCDAEAD".toCharArray() ; char[][] studentsAnswersFromStrings = { "ABACCDEEAD".toCharArray(), "DBABCAEEAD".toCharArray(), "EDDACBEEAD".toCharArray(), "CBAEDCEEAD".toCharArray(), "ABDCCDEEAD".toCharArray(), "BBECCDEEAD".toCharArray(), "BBACCDEEAD".toCharArray(), "EBECCDEEAD".toCharArray() } ;
USE THE ABOVE CODE IN YOURS ANSER ( ANY ONE OF 2) THERE SHOULD BE NO INPUT NEEDED
This assignment is the first in-class assignment dealing with single- and multi-dimensional arrays, specifically, to grade student exams using a single-dimensional array to hold the answer key and a multi-dimensional array to hold the students' answers. You need to complete this assignment prior to doing part 2. For today: Create a class to grade student responses to a multiple choice test. You will create a single-dimensional array for the answer key and a multi (two)-dimensional array to hold the students' answers For simplicity, make the answer key a charll and the student answers a charlJU. To instantiate and initialize them, use the curly brace notation. [See the sample code fragments to save some typing.] The data for the answer key is: Question number (index) 0 1 2 3 4 5 6 7 8 9 Correct answer D B D C C D A E A D The data for the student answers is: 0 1 2 3 4 5 6 7 89 Question number (index) Student A B A C C D E E A D Student 1 D B A B C A E E A D Student 2 E D D A C B E E A D Student 3 C B A E D C E E A D Student 4 A B D C C D E E A D Student 5 B B E C C D E E A D Student 6 B B A C C D E E A D Student 7 E B E C C D E E A D Your program should not do any input/prompting. The output is mostly up to you but it should reflect each student's grade, the success rate for each question or both. Remember: Use mnemonic variable names even for loop variables You may create utility methods but it is not required. No error checking is required all data is valid
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
