# Project #50359 - java HW

Matrix Multiplication!

Objective:

Write a program that can create two matrices and then it multiplies them!

• The user first inputs the size length and width
• Next the user populates that matrix with data
• The user then inputs the size length and width of the next matrix
• Once again they populate it
• Next the program must check to see if the dimensions match
• A n-by-m matrix can only be multiplied by a m-by-l matrix where n, m, and l correspond to the sizes of the matrices.
• If they do match correctly then create a new matrix and put the newly multiplied info inside of it.
• Multiply the individual numbers of the first matrix’s columns by the individual number of the other matrix’s row and add those together.
• The matrix size when multiplying a n-by-m by a m-by-l will result in a n-by-l matrix

Here is a wiki article for more clarification

http://en.wikipedia.org/wiki/Matrix_multiplication

Example Dialog:

Welcome to the matrix multiplier program

Please enter the length of the first matrix

1

Please enter the height of the first matrix

3

Please enter the length of the second matrix

3

Please enter the height of the second matrix

3

Please enter a value for matrix 1 space 1, 1

3

Please enter a value for matrix 1 space 1, 2

1

Please enter a value for matrix 1 space 1, 3

4

Please enter a value for matrix 2 space 1, 1

1

Please enter a value for matrix 2 space 1, 2

3

Please enter a value for matrix 2 space 1, 3

8

Please enter a value for matrix 2 space 2, 1

2

Please enter a value for matrix 2 space 2, 2

4

Please enter a value for matrix 2 space 2, 3

6

Please enter a value for matrix 2 space 3, 1

8

Please enter a value for matrix 2 space 3, 2

0

Please enter a value for matrix 2 space 3, 3

9

3 1 4

X

1 3 8

2 4 6

8 0 9

=

37 13 66

DONE!

Finally:

Upload the .java file to the dropbox

 Subject Computer Due By (Pacific Time) 12/04/2014 11:30 pm
TutorRating
pallavi

Chat Now!

out of 1971 reviews
amosmm

Chat Now!

out of 766 reviews
PhyzKyd

Chat Now!

out of 1164 reviews
rajdeep77

Chat Now!

out of 721 reviews
sctys

Chat Now!

out of 1600 reviews

Chat Now!

out of 770 reviews
topnotcher

Chat Now!

out of 766 reviews
XXXIAO

Chat Now!

out of 680 reviews