-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAssignment2_Problem
More file actions
3 lines (2 loc) · 860 Bytes
/
Assignment2_Problem
File metadata and controls
3 lines (2 loc) · 860 Bytes
1
2
3
Create a class that first inquires from user the size of a 2D matrix (rows and columns), and then creates and fills the matrix with doubles (decimal values). Similarly create a second 2D matrix of a new size (rows and columns), fill it with doubles, and check if first matrix can be multiplied to the second matrix or not. If they can be multiplied, then get the result of multiplication of both 2D matrices, otherwise indicate that multiplication of first with second matrix is not possible.
Make sure to make a single class of 2D matrix, make two objects (one for each 2D matrix) and use multiply function from within matrix that should take in the second matrix to be multiplied, checks if it is possible to multiply and returns either a new result matrix or a null value indicating that multiplication is not possible for the given matrix.