Question: 2-D Array Programming AP Computer Science Assignment Write a program that calculates the test average for each student and the average for each test. TestScores


2-D Array Programming AP Computer Science Assignment Write a program that calculates the test average for each student and the average for each test. TestScores File Create a class TestScores that has a calcStudentAverage(int row), calcTestAveragel), and calcCurvedAveragel). There should be a default constructor and a constructor that has a 2-D array of test scores as a parameter. The class should contain one instance field, the array of test scores, calcCurved Averagel) - If every test score increases from the last test score for the entire quarter, the student earns the highest/last test score for his/her test average for the quarter. Otherwise, the average (mean) is calculated by calling the calcStudentAverage(int row). The calcStudentAverageint row) method will return the average of one student's test scores, The calcCurvedAverage() method will return a 1D array of student test averages. The calcTestAverage() method returns a 1D array of test averages. TestScoresTester File Your program will create and assign the 2-D array of test scores in the test/client file called TestScoresTester. Each row represents the test scores for a single student and each column represents test scores for the same test. Pass the array of test scores to the class through the constructor. Call the calcCurvedAveragel) and calcTestAverage() methods in the test file. Use the returned values and the original array to create the output. Examples of 2-D Arrays: int[] tests - ( 180,90,100). 188, 98, 87), 178, 89.92........); int tests - ( 192, 84). 179.85), 185, 90)......: Example of Output Test Averages Test 1 Test 2 Test 3 Average Student #1 80 70 90 80 Student #2 78 88 98 98 Student #3 75 85 80 80 Test Average 77 81 89 Examples of 2-D Arrays: int[ 1 ] tests = [ 180,90,100). (88, 98,871, 178, 89, 92).........: int[] tests - [[92, 84). (79.85). (85.90)........); Example of Output Test Averages Test 1 Test 2 Test 3 Average Student #1 80 70 90 80 Student #2 78 88 98 98 Student #3 75 85 80 80 Test Average 77 81 89 Your program should output the test average for each student and the average for each test. The output should be organized in a format that is easy to interpret. Upload your final 2 files in the same replit and create the replit file
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
