.ZIP

# COSC 450 Project2 – Programming in another language Solved

Specifications:

1. This is an individual assignment. You will work on this assignment by yourself.

2. Please use any computer language (but not Java, C, or C++, and it is recommended that you choose a language you know nothing about it yet.) to create a program to do the following:

a. Open and read from the data file, “COSC450_P2_Data.txt”, which contains some number of integer values (separated by white space character(s)) with the number of integers a multiple of 10. A sample “COSC450_P2_Data.txt” file will be given to you but your program should be able to process any “COSC450_P2_Data.txt” file with the above property.

b. After read in the data file your program will process the integer values into two matrixes (stored in two dimension arrays): the first one with the dimension 5 * X and the second one X * 5, where X is some value determined by the number of integers in the input data file.

c. Output the above two matrixes into an output file, “COSC450_P2_Output.txt”, created by your program.

d. Calculate a product matrix (a two-dimension array of long integers) based on the first matrix multiplies the second matrix;

e. Write the product matrix out to the same output file, “COSC450_P2_Output.txt”, bybappending it to the end;

f. Bonus points for undergraduates (10 points) and required for graduates: sort the product matrix and append it to the end of the above output file,

“COSC450_P2_Output.txt”. Your sorting cannot be done by copy the values out from the matrix into a single dimension array then put it back but has to be done on the matrix directly by manipulating the subscripts correctly.

1. This is an individual assignment. You will work on this assignment by yourself.

2. Please use any computer language (but not Java, C, or C++, and it is recommended that you choose a language you know nothing about it yet.) to create a program to do the following:

a. Open and read from the data file, “COSC450_P2_Data.txt”, which contains some number of integer values (separated by white space character(s)) with the number of integers a multiple of 10. A sample “COSC450_P2_Data.txt” file will be given to you but your program should be able to process any “COSC450_P2_Data.txt” file with the above property.

b. After read in the data file your program will process the integer values into two matrixes (stored in two dimension arrays): the first one with the dimension 5 * X and the second one X * 5, where X is some value determined by the number of integers in the input data file.

c. Output the above two matrixes into an output file, “COSC450_P2_Output.txt”, created by your program.

d. Calculate a product matrix (a two-dimension array of long integers) based on the first matrix multiplies the second matrix;

e. Write the product matrix out to the same output file, “COSC450_P2_Output.txt”, bybappending it to the end;

f. Bonus points for undergraduates (10 points) and required for graduates: sort the product matrix and append it to the end of the above output file,

“COSC450_P2_Output.txt”. Your sorting cannot be done by copy the values out from the matrix into a single dimension array then put it back but has to be done on the matrix directly by manipulating the subscripts correctly.

You'll get a 2.5MB .ZIP file.