Question: I need help with this Java problem. Please use the provided code to test as well. Screenshots of this problem and the tests to run
I need help with this Java problem. Please use the provided code to test as well. Screenshots of this problem and the tests to run are below. I cannot provide screenshots for FractionMatrixTest.java because it is too long.
Problem:
public class FractionMatrix implements FractionMatrixI { /////////////////////////////// FIELDS /////////////////////////////// private Fraction[][] array; private static final Fraction ZERO = new Fraction(0); //////////////////////////// CONSTRUCTORS //////////////////////////// // Construct an m x n matrix with null elements. public FractionMatrix(int m, int n) { array = new Fraction[m][n]; // all elements are null } // Construct a matrix with dimension and elements copied from a. // Precondition: Array a is rectangular public FractionMatrix(Fraction[][] a) { int rows = a.length; int cols = a[0].length; array = new Fraction[rows][cols]; for (int row = 0; row
Problem Code:



Test Code:
Fraction.java:

FractionI.java:
![private Fraction[][] array; private static final Fraction ZERO = new Fraction(0); ////////////////////////////](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66fa2b9eb253a_19866fa2b9e31770.jpg)
FractionMatrixI.java:

MatrixException.java
![public FractionMatrix(int m, int n) { array = new Fraction[m][n]; // all](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66fa2b9ff0d51_19966fa2b9f938fb.jpg)
public class FractionMatrix implements FractionMatrixi { ////// FIELDS // private Fraction[][] array: private static final Fraction ZERO = new Fraction(); 7/11/1/ CONSTRUCTORS //////// // Construct an mxn matrix with null elements. public FractionMatrix(int n, int n) { array = new Fraction[m][n]; // all elements are null } 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 // Construct a matrix with dimension and elements copied from a. // Precondition: Array a is rectangular public FractionMatrix (Fraction] a) { int rows = a.length; int cols = a[0].length; array = new Fraction[rows] (cols]; for (int row = 6; row
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
