1. Engineering
  2. Computer Science
  3. i need a java class that creates this matrix based...

Question: i need a java class that creates this matrix based...

Question details

Specifications Your program will read the parameters from standard input. This part of the program will have three inputs, the number of rows, the number of columns, and a seed to randomly fill the matrix. The number of rows and columns are integers. the seed is a long. You must read the values in exactly that order with no other input. You are to construct a two-dimensional matrix of booleans of the given size. You should fill the matrix with false. Then create a Random object initialized with the provided seed and fill the interior of the matrix row by row from left to right within cach row. Do not place a new value in the first or last row, or the first or last column of the matrix as they may not contain an entity (and hence should remain falsc). You should use the nextBoolcan method of the Random object to get cach value. This will provide a matrix were cach value (other than on the edgc is equally likely to be true or falso Print a blank line be re printing your output. T en print the matrix by printing a there should be a space at t or each false and a # or cach true nclude the outside rows and columns in the printing. Print a space be ore and a er cach or # Thus he beginning and end of cach line, and two spaces between cach printable character Instructions You should name your file and class Life for compatibility with later assignments You should use several public static methods with appropriate parameters in this assignment. Remember that cach function should do one thing and do one thing w. You should not use any non-local (class or instance) variables. Check your work. Have you tested your program with large and small matrices? Have you included your name in the comments and expanded the comments to include a description of the problem? Did you use methods? Does each method have a short comment describing what does and perhaps pre- and post-conditions? Did you pass the parameters appropriately? Does the programs indenting match its control structure? Do the for loops have appropriate bounds? Submission Submit this as the matrix lab to my hutchens162 grader account. Sample Input 6 8 Sample OutputI need a Java class that creates this matrix based upon the three inputs. Also, the outside of the matrix will always be blank.

Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution