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

  Recursive factorial program

Write a class Array that encapsulates an array and provides bounds-checked access. Create a recursive factorial program that prompts the user for an integer N and writes out a series of equations representing the calculation of N!.

  Hunt the wumpus game

Reprot on Hunt the Wumpus Game has Source Code listing, screen captures and UML design here and also, may include Javadoc source here.

  Create a gui interface

Create GUI Interface in java programing with these function: Sort by last name and print all employees info, Sort by job title and print all employees info, Sort by weekly salary and print all employees info, search by job title and print that emp..

  Plot pois on a graph

Write a JAVA program that would get the locations of all the POIs from the file and plot them on a map.

  Write a university grading system in java

University grading system maintains number of tables to store, retrieve and manipulate student marks. Write a JAVA program that would simulate a number of cars.

  Wolves and sheep: design a game

This project is designed a game in java. you choose whether you'd like to write a wolf or a sheep agent. Then, you are assigned to either a "sheep" or a "wolf" team.

  Build a graphical user interface for displaying the image

Build a graphical user interface for displaying the image groups (= cluster) in JMJRST. Design and implement using a Swing interface.

  Determine the day of the week for new year''s day

This assignment contains a java project. Project evaluates the day of the week for New Year's Day.

  Write a java windowed application

Write a Java windowed application to do online quiz on general knowledge and the application also displays the quiz result.

  Input pairs of natural numbers

Java program to input pairs of natural numbers.

  Create classes implement java interface

Interface that contains a generic type. Create two classes that implement this interface.

  Java class, array, link list , generic class

These 14 questions covers java class, Array, link list , generic class.

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