Question: in java ( using simple methods and reading file ways !!! level 1 ) : Problem 2: 1- Write a method that fills a two

in java ( using simple methods and reading file ways !!! level 1 ) :

Problem 2:

1- Write a method that fills a two dimensional array of characters. The characters are read from an input file. The first two numbers are the number of rows and the number of columns of the array. Example input file:

5 3

a b c

d e f

g h i

j k l

m n o - Test your method by filling two arrays of characters from two different input files. 2- Write a method areEqual() that receives two two-dimensional arrays of characters, and returns true if the two arrays are equal, and false if the two arrays are not equal. The comparison is a deep comparison that compares the contents of the two arrays. - Test your method twice, once with two equal methods and another time with two different methods. 3- Write a method Write a method isIdentity() that receives one two-dimensional array of integers, and returns true if the array is the identity matrix, and false otherwise. Hint: The identity matrix has ones in its diagonal and zeros everywhere else. Also, the identity matrix has the same number of columns and rows. For example:

1 0 0 0 0

0 1 0 0 0

0 0 1 0 0

0 0 0 1 0

0 0 0 0 1

- Test your method twice; once with an identity matrix and another time with a non-identity matrix

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!