java coding

0 comments

Question 1 Design a Java program to implement matrix arithmetic for square matrices (same number of rows and columns). You will need to use your math textbook or the Internet to review operations with matrices.Make sure that your program is calling methods to perform (at least) the following operations:

Generate: Generate a matrix with values 1 – 10

Addition: See http://mathworld.wolfram.com/MatrixAddition.html Subtraction: Figure it out!Multiplication

— Multiply two matrices: See http://mathworld.wolfram.com/MatrixMultiplication.html

— Multiply a matrix by a constant: Equivalent to multiplication of each element by that constant.

Transposition: See http://mathworld.wolfram.com/Transpose.html

Matrix Trace: See http://mathworld.wolfram.com/MatrixTrace.html

Print (use printf)

Have another method called menu(), that should list the options for matrix operations for which you designed the previous functions, and an option to exit the program. Your program should loop until the user chooses to exit. In this loop you are required to use a switch statement for all possible cases.

//Please DONT forget to add comment for each step.

Focus on good design, good style, and, most importantly, reuse of code

About the Author

Follow me


{"email":"Email address invalid","url":"Website address invalid","required":"Required field missing"}