Question: Write a program in java to generate this Matrix 10 20 30 40 50 20 30 40 50 60 30 40 50 60 70 40
Write a program in java to generate this Matrix
| 10 | 20 | 30 | 40 | 50 |
| 20 | 30 | 40 | 50 | 60 |
| 30 | 40 | 50 | 60 | 70 |
| 40 | 50 | 60 | 70 | 80 |
| 50 | 60 | 70 | 80 | 90 |
Conditions:
Initialize matrix inside Constructor
Print Matrix by using a method called DisplayMatrix()
Manipulate your Matrix by using a method called ManipulateMatrix(int x). If x is 2 then your Matrix will stand as follows
| 20 | 40 | 60 | 80 | 100 |
| 40 | 60 | 80 | 100 | 120 |
| 60 | 80 | 100 | 120 | 140 |
| 80 | 100 | 120 | 140 | 160 |
| 100 | 120 | 140 | 160 | 180 |
4. Again call the same method called DisplayMatrix()
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
