05101 Spring 2019 Homework 12: Matrix Operations Flead Chapter 8 on Multi-dimensional arrays. This chapter has sample code that will be helpful with
Hi, this is a homework for my intro to Computer Science class which uses the Java programming language. Attached below is the problem. The deadline is 3/17 (next Sunday):
- Attachment 1
- Attachment 2
- Attachment 3
05101 Spring 2019 Homework 12: Matrix Operations Flead Chapter 8 on Multi-dimensional arrays. This chapter has sample code that will be helpfulwith this assignment. Write methods that allow the user to operate on matrices. A. Program DescriptionA matrix is a two dimensional array of numbers. For example:10 5 7 4O 1 102 9 30 5 60 3 '3"? 1 4 3O OOHOI—lI-IOI-II-Io Your program should do the following: 1. Prompt the user for the number of rows and the number of columns in the matrix. Themaximum number of rows or columns is 5, the minimum is 1. Your program will ask the userwhat size matrix to create and you should trap illegal size requests. 2. Generate a matrix having the dimensions specified by the user. 3. Assign integers to each element of the matrix as follows (first row starts with 0, increment byone for each column; second row starts with 10, increment by one for each column;...): If the user enters 3 rows and 2 columns, the matrix is initialized with exactly the following values:0 110 112O 21 If the user enters 4 rows and 5 columns, the matrix is initialized with exactly thesevalues: 0 1 2 3 410 11 12 13 1420 21 22 23 2430 31 32 33 34 4. Your program should print the matrix to the screen.
Show more