Instructions code a 2-dimensional 2d array that stores the


Instructions: Code a 2-dimensional (2D) array that stores the average scores for 2 football teams across 2 years. In a method called setAvgScores, prompt for the averages and store them in the 2D array which will be returned.

In the main(), call setAvgScores() and print the averages. Save the program as YourLastNameFirstInitialArraysV2.java. Which one is the row and which one is the column? Hint: For every team there are 2 years of stats.

Prompt: This prompt will be repeated for each team where the single 9s in the label represent the year and the team respectively.

import java.util.Scanner;

public class ArraysV2
{
public static void main (String] args)
{
//CALL THE setAvgScores() AND ASSIGN THE 2D ARRAY //THAT IT IS RETURNING TO A 2D ARRAY THAT IS LOCAL //TO THE MAIN
//USE FOR LOOPS (ONE NESTED WITHIN THE OTHER) TO //NAVIGATE THROUGH THE ARRAY AND PRINT ITS CONTENT
}// End main()
public static double= setAvgScores()
{
//CREATE A 2D ARRAY
//POPULATE THIS ARRAY USING AN OUTER FOR LOOP //THAT NAVIGATES TO EACH ROW
//THEN USE A NESTED FOR LOOP TO NAVIGATE THROUGH //EACH COLUMN WITHIN A GIVEN ROW
//RETURN THE 2D ARRAY
}//END setAvgScores() static double[][]

}//END APPLICATION CLASS

Solution Preview :

Prepared by a verified Expert
JAVA Programming: Instructions code a 2-dimensional 2d array that stores the
Reference No:- TGS01176992

Now Priced at $30 (50% Discount)

Recommended (90%)

Rated (4.3/5)