Question: Processing Arrays Consider two parallel arrays, one that stores student names and another (2D) that stores their test marks. Name Test 1 Test 2 Test


Processing Arrays Consider two parallel arrays, one that stores student names and another (2D) that stores their test marks. Name Test 1 Test 2 Test 3 Test 4 Potter 80 75 65 82 Weasley 70 62 45 78 Granger 100 100 95 100 Consider the driver program below public class Program4 { public static void main(String[] args) { String[] students = { "Potter", "Weasley", "Granger" }; int[][] marks { {80, 75, 65, 82), {70, 62, 45, 78), {100, 100, 95, 100)); int m = getMark ("Granger", students, marks, 4); displayTestAverage (marks, 2); displayTestAverage (marks,2,3); unknownMethod (students, marks); Question 6 (23 points) Write the method displayTestAverage() that accepts the array of test marks and an indefinite number of test numbers (as shown in the example above). The method displays the average for every test number passed as input. For example, the call displayTestAverage(marks, 2, 3); produces the output The average of test 2 is 79.0 The average of test 3 is 8.33333333333333
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
