Question: This assignment is based on your knowledge of 2D matrices. Create a program TwoDProgram.java. Ask the user to enter number of rows and columns of

 This assignment is based on your knowledge of 2D matrices. Create

This assignment is based on your knowledge of 2D matrices. Create a program TwoDProgram.java. Ask the user to enter number of rows and columns of a double Matrix 1. Ask the user to enter the dimensions of a double Matrix 2 as well. Check if dimensions of Matrix 1 match with dimensions of Matrix 2. If not, show an error message and end the program. Otherwise, Instantiate the two arrays. Ask the user to enter numbers to populate Matrix 1 and Matrix 2. Use Scanner and nextDouble. Repeatedly ask the user to enter a choice (1) Addition (2) Subtraction, (3) Multiplication, and (4) Quit. If the user selects option 1, perform element-wise addition and show the output. For instance: 3 4 1 4 4 8 4 1 + 0 4 = 4 5 3 1 1 1 4 2

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!