// Multiplication of two polynomialspublic static Poly polyTimes (Poly A, Poly B) { // Determine length of coefficient array int lengthC = A.coeffs.length * B.coeffs.length; // Determine common denominator long denomC = A.denominator * B.denominator; // Create return value Poly C = new Poly ( A.variableName, new long [lengthC], denomC); // Set all coefficients to 0 for (int i = 0; i < C.coeffs.length; i++) { C.coeffs[i] = 0; }; for ( i=0; i<A.coeffs.length; i++) { for (j=0; j<B.coeffs.length; j++) { foo bar } } }