Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

please help in java Write a program that displays 4 matrices to the user, then asks the user to select 2 matrices. Then ask if

please help in java

Write a program that displays 4 matrices to the user, then asks the user to select 2 matrices. Then ask if they want to add or multiply them. Print out the two matrices the user selected along with the results of the users choice (if possible).

Program Requirements:

Create 4 matrices: a 2x2, a 2x3, a 3x2, and a 3x3 matrix. Hard code the values in each of the matrices. Do NOT ask the user for the values in each matrix.

For example:

A = 1 1

2 3

B = 4 5 1

5 6 12

C = 6 -1

7 -9

2 0

D = 9 5 3

-1 0 5

12 0 7

Select the first matrix (A,B,C,D): a

Select the second matrix (A,B,C,D): c

Do you want to add or multiply them (A, M): m

Invalid. You cannot multiply A and C together.

  • The user can choose the same matrix twice.
  • Do no use binary (1,0 only) matrices.
  • Do not hard code the ANSWERS (just the matrices).
  • Provide some test cases. (Refer to Developing Test Cases in the Getting Started module for my expectations on test cases)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Semantics In Databases Second International Workshop Dagstuhl Castle Germany January 2001 Revised Papers Lncs 2582

Authors: Leopoldo Bertossi ,Gyula O.H. Katona ,Klaus-Dieter Schewe ,Bernhard Thalheim

2003rd Edition

3540009574, 978-3540009573

More Books

Students also viewed these Databases questions

Question

What is the Nationwide Definition of marine insurance?

Answered: 1 week ago

Question

Write minutes of meetings and summaries.

Answered: 1 week ago