Menu

[Solved]Write Method Called Create2darray Fill Create Return 10 X 10 2d Array Random Numbers Range Q37186839

Output Console (run) 81 18 73 78 80 47 12 34 96 16 97 56 18 27 23 81 65 18 81 16 94 65 27 52 36 85 68 79 38 82 21 50 93 63 34Write a method calledcreate2DArray that will fill, create, and return a 10 x 10 2d arraywith random numbers in the range of 1 to 100.

Write a method called print2DArray that will print a 10 x 10 2Darray in row column fashion.

Write a method called createCoords that will search the 2D arraylooking for any value that is evenly divisible by 3. Once you havefound a number you should log the row, column location. This meanswhen your method finishes it should produce a list of coordinatesthat I can use to plot my graph. This method must also return thenumber of coordinates that are divisible by 3 so that I know howmany points there are to plot.

I am not particular as to how the coordinates are returned backas long as I get a list of the row, column locations. So, I willleave it to you to work out a mechanism for returning the values.Some possibilities are:

  • String
  • Array
  • 2D Array

To test that you have logged the coordinates create anotherfunction called fillLocations that will fill the locations in thearray you have logged with -1. So, your program should flow in thisorder

  1. create2DArray
  2. print2DArray
  3. createCoords
  4. fillLocations
  5. print2DArray

What not to do

Using any of the following will drop your grade for thisassignment by 70%

  • Field variables
  • Console in in any funciton other than main
  • Consoel out in any funciton other than main andprint2DArray

Output Console (run) 81 18 73 78 80 47 12 34 96 16 97 56 18 27 23 81 65 18 81 16 94 65 27 52 36 85 68 79 38 82 21 50 93 63 34 67 13 51 31 52 19 98 10 93 10 58 100 18 81 90 13 65 35 37 68 78 71 16 29 23 68 65 29 63 After Create Coords 16 97 65 80 56 73 65 47 85 68 79 38 67 16 94 52 13 34 82 23 31 52 19 98 10 50 58 100 35 10 13 65 37 68 71 16 29 23 68 65 29 34 BUILD SUCCESSFUL (total time: 0 seconds) Output Show transcribed image text Output Console (run) 81 18 73 78 80 47 12 34 96 16 97 56 18 27 23 81 65 18 81 16 94 65 27 52 36 85 68 79 38 82 21 50 93 63 34 67 13 51 31 52 19 98 10 93 10 58 100 18 81 90 13 65 35 37 68 78 71 16 29 23 68 65 29 63 After Create Coords 16 97 65 80 56 73 65 47 85 68 79 38 67 16 94 52 13 34 82 23 31 52 19 98 10 50 58 100 35 10 13 65 37 68 71 16 29 23 68 65 29 34 BUILD SUCCESSFUL (total time: 0 seconds) Output

Expert Answer


Answer to Write a method called create2DArray that will fill, create, and return a 10 x 10 2d array with random numbers in the ran… . . .

OR


Leave a Reply

Your email address will not be published. Required fields are marked *