Question: Write a complete Java program to do the following: Declare an array named numArray2D as a two-dimensional array of int values with four rows and

  1. Write a complete Java program to do the following:
    1. Declare an array named numArray2D as a two-dimensional array of int values with four rows and three columns.
    2. Fill the array with data read from the text file 2DArrayData.txt. The first three items in the file will be used to fill the first row of the array, the second three for the second row, the next three for the third row, and the last three for the fourth row.
    3. Print the contents of the array in table format with four rows and three columns.
    4. Calculate the average value of the numbers stored in the array.
    5. Print out all values in the array that are greater than the average.

Output of program:

25 10 14

4 5 3

9 8 15

17 12 20

average = 11.833333333333334

Array values greater than average:

25 14 15 17 12 20

Contents of 2DArrayData.txt

25

10

14

4

5

3

9

8

15

17

12

20

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

To address the task of writing a complete Java program as specified Ive noted that the initial answer outlines the general steps correctly but lacks s... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!