Question: A java question Question 2: Cheating in Exams (45 points) For this question, you will again use multi-dimensional arrays, and you will write several methods
A java question



Question 2: Cheating in Exams (45 points) For this question, you will again use multi-dimensional arrays, and you will write several methods to build a program that flags students for potential cheating on multiple choice exams. Your code for this question should go in the same file as the previous question ExamGrading.java Page 3 (a) Write a method numWrongSimilar that takes as input two char arrays representing the answers of two different students, as well as a char array of solutions. This method returns the number of wrong answers that the students had the same. This method should throw an IllegalArgumentException if the students have responses that differ in length from each-other, or from the solutions. For example, suppose the answer arrays are 'A', 'B', 'C', 'D', 'C', 'A' 'A', 'B', 'D', 'B', 'B', 'A' and the solutions are 'C', 'B', 'C', 'D', 'A', 'A' Then the method would return 1, since the only question where they both put the same wrong answer is the first one
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
