Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The goal in this assignment is to perform various matrix multiplications. Input matrices A and B are read from a file. Output matrices A*A, A*B,

The goal in this assignment is to perform various matrix multiplications. Input matrices A and B are read from a file. Output matrices A*A, A*B, B*A and B*B are written to file.

-Ask the user to enter the input and output file names.

-Read the input data matrices A and B from the input file. (A sample input file is shown in Appendix A)

-Read the number of rows n.

-Read matrix A, which has n rows and n columns.

-Read string A.(this data is not used)

-Read matrix B, which has n rows and n columns.

-Read string B. (this data is not used)

- Calculate matrices AA, AB, BA and BB, where

-AA=A*A

-AB=A*B

-BA=B*A

-BB=B*B

-Write the following to the output file (A sample output file is shown in Appendix B. Use type double for the matrix elements, and include one decimal place in the output of each number)

-String First matrix A

- line space

-Matrix A, which has n rows and n columns (requires n lines)

-line space

-String Second matrix B

- line space

-Matrix B, which has n rows and n columns (requires n lines)

-line space

-String Matrix multiplication A*A

- line space

-Matrix AA, which has n rows and n columns (requires n lines)

-line space

-String Matrix multiplication A*B

- line space

-Matrix AB, which has n rows and n columns (requires n lines)

-line space

-String Matrix multiplication B*A

- line space

-Matrix BA, which has n rows and n columns (requires n lines)

-line space

-String Matrix multiplication B*B

- line space

-Matrix BB, which has n rows and n columns (requires n lines)

-line space

Note: Read and write matrixes from files, and explain each steps.

the language is JAVA.

Thank you.

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

Learning MySQL Get A Handle On Your Data

Authors: Seyed M M Tahaghoghi

1st Edition

0596529465, 9780596529468

More Books

Students also viewed these Databases questions