Java – Question1 Solved

$ 24.99
Category:

Description

Given the vectors

where m and n are the dimensions (size) of vectors u and v respectively, the outer product u v is defined as the m × n matrix A obtained by multiplying each element of u by each element of v.

that is A_ij = u_i * v_j.
1. İmplement the openInputFile(String fileName)method. This method takes the file name of the text file and returns a BufferedReader variable rd wich can be used to iterate through lines of the file.
[10 Points]

2. Implement readFileToArray(String fileName) method. This method iterates through lines of the text file and assigns the values to an integer array. You need to use Integer.parseInt method to convert the value of as string variable to integer.
For example if u have as string variable line and a BufferedReader variable rd.
String line=rd.readLine(); int x=Integer.parseInt(line);
[15 Points]
3. Implement the OuterProduct(int []U ,int []V) This method takes vectors U and V and returns their outer poduct .
[25 Points]
(Run your program as java application)

Reviews

There are no reviews yet.

Be the first to review “Java – Question1 Solved”

Your email address will not be published. Required fields are marked *