Write a java program to perform matrix multiplication

Assignment Help JAVA Programming
Reference no: EM13317496

In this project you need to write a java program called "MM.java" to perform matrix multiplication. Your code will read in two input files named"matrixA.txt" and "matrixB.txt", and then create a file named"matrixAnswer.txt" and output the result to the file.

Input and Output:

Your code will need to be able to read in these files, place the contents of each file into separate two-dimensional arrays and then perform the needed multiplication and place the output of the multiplication into a third two-dimensional array then write the array out into a file.

Please check the sample input files"matrixA.txt" and "matrixB.txt".

1. matrixA.txt is the file that contains the first matrix A. It has x rows and y columns. The numbers in each row are separated by one blank space.

2. matrixB.txt is the file that contains the second matrix B. It has y rows and z columns. The numbers in each row are separated by one blank space.

Please check the sample output file "matrixAnswer.txt".

1. matrixAnswer.txt is the matrix by multiplying matrix A and matrix B. Your program should create the file and output the result to the file. It has x rows and z columns. The numbers in each row are separated by one blank space.

Sample input files are provided but you can't presume the size of the input matrices. You will also need to check if it is legal to multiply both of these matrices together. If it is not legal, you need to inform the user that you are unable to perform the multiplication. As long as the two input matrices have the legal sizes to do multiplication then your program should generate the right product of the two matrices.

Reference no: EM13317496

Questions Cloud

Calculate the repricing gap and the impact on net interest : Calculate the repricing gap and the impact on net interest income of a 1percent increase in interest rates for each position.
What if the manager believed rates would fall in the next : If a bank manager was quite certain that interest rates were going to rise within the next six months, how should the bank manager adjust the bank"s six-month repricing gap to take advantage of this anticipated rise?
What is the relation between changes in interest rates : What is the CGAP effect? According to the CGAP effect, what is the relation between changes in interest rates and changes in net interest income when CGAP is positive? When CGAP is negative?
Assets and liabilities important in using the repricing : What is a maturity bucket in the repricing model? Why is the length of time selected for repricing assets and liabilities important in using the repricing model?
Write a java program to perform matrix multiplication : Write a java program to perform matrix multiplication - Your code will need to be able to read in these files, place the contents of each file into separate two-dimensional arrays and then perform the needed multiplication and place the output of t..
On what financial performance variable does the repricing : What is the repricing gap? In using this model to evaluate interest rate risk, what is meant by rate sensitivity? On what financial performance variable does the repricing model focus? Explain.
Which do you think is more volatile which market do you : Fed funds versus the Discount Rate Compare and contrast the Fed funds rate and the discount rate. Which do you think is more volatile? Which market do you think is more active? Why?
What is the bond equivalent yield : Bond Equivalent Yields Suppose a T-bill has 75 days to maturity and an asked discount of 4 percent. What is the bond equivalent yield?
Explain what the term culture means to you : What are some of the differences you might come across when interacting with clients, customers, colleagues and workmates in a community service organisation?

Reviews

Write a Review

JAVA Programming Questions & Answers

  The frantic pipe layer game

Design the Frantic Pipe Layer game

  Implement a shopping cart class with user interface

project will be to implement a shopping cart class with user interface (UI) that contains main() in Net Beans. The UI class will be used to perform user input/output and to invoke the appropriate methods of shopping cart class. When your program star..

  Write java program to print price of table-furniture company

Write down the Java program for furniture company. Ask user to select P for Pine, O for Oak or M for Mahogany. Illustrate the price of table produced with chosen wood.

  Java application that reads a date in numeric form

Designand write a java application that reads a date in numeric form from a set of three fields and displays it in English within a label. Use appropriate buttons. For Example:

  Graphics program that draws 12 strings

Write a graphics program that draws 12 strings, one each for the 12 standard colors, besides Color.WHITE, each in its own color. Provide a class ColorNameViewer and a class ColorNameComponent.

  Write a java program that finds the temperature

Write a JAVA program that finds the temperature that is the same in both Celsius and Fahrenheit

  Organization structure change over time

How and why did the organization structure change over time, and in what ways were some of these changes responsible for some of their recent problems?

  Elliptic curve encryption

write a program to implement Elliptic Curve encryption/decryption and program will read parameters, plaintext and ciphertextfrom a file named "input.txt" (under the same directory).

  Method that receives an array and returns with no duplicate

Write a program that contrains a method that receives an array and returns a new array with no duplicates.

  Cross the dark knight and the living flame of love

What challenges does spain get from the text john of the cross the dark knight and the living flame of love?

  Write down java console application to add new student

Write down java console application presents the following menu. Add new student and scores in Biology, Physics and chemistry Search for a given student.

  Implement/update specific methods for the dfs of a graph

show the DFS order of vertices in the graph, and for each node, specify its parent node in the search (the node from which the currect node was reached). Moreover, display for each node the discovery and finishing time, to check that the Parenthesis ..

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd