Skip to main content

All Questions

Tagged with
2 votes
1 answer
810 views

Sum of Two Matrices

For a homework assignment, I was asked to do this problem. It worked, but it looks messy in my opinion. I want to know if this is the best way to accomplish this task, and if there can be any ...
Ben A's user avatar
  • 10.7k
2 votes
1 answer
4k views

Swapping the diagonals of a matrix [closed]

I am required to write a simple matrix program and swap the diagonal. Given the input 1 2 3 4 5 6 7 8 9 After swapping the diagonal it should be ...
Ardley's user avatar
  • 21
13 votes
5 answers
4k views

Enter my Matrix

Here is my next Java assignment: create a Matrix class that can add and multiply two matrices together. I was given some code as a skeleton and then fleshed it out ...
syb0rg's user avatar
  • 21.9k
3 votes
2 answers
540 views

addMatrix() method

Can anyone review my addMatrix() method to see if I am following the instructions correctly? These are the instructions: This is a ...
Khoa Vo's user avatar
  • 109