Question: Here is the test program. } } else if (i == -1) { RecursionIntro.printsparsetable(13, 20); System.setOut(out); String expected = 13 15 15 18 16 21

 Here is the test program. } } else if (i ==

Here is the test program.

-1) { RecursionIntro.printsparsetable(13, 20); System.setOut(out); String expected = "13 15 15 1816 21 20 24 "; if (!Arrays.equals(expected.split(" ? "), ba.toString().split(" ? "))){ System.out.println("For printsparsetable(13, 20), expected: " + expected + " , got:

} } else if (i == -1) { RecursionIntro.printsparsetable(13, 20); System.setOut(out); String expected = "13 15 15 18 16 21 20 24 "; if (!Arrays.equals(expected.split(" ? "), ba.toString().split(" ? "))) { System.out.println("For printsparsetable(13, 20), expected: " + expected + " , got: " + ba); } else { stGenScore ++; } } else { RecursionIntro.printsparsetable(starts[i], ends[i]); System.setOut(out); byte[] digest = md5.digest(Arrays.toString(ba.toString().split(" ? ")).getBytes()); if (!Arrays.equals(md5s[i], digest)) { System.out.println( "Didn't get expected output for printsparsetable(" + starts[i] + ", " + ends[i] + ")"); System.out.println("Saw this:"); System.out.println(ba); System.out.println("MD5 sum of output seen: " + Arrays.toString(digest)); } else stGenScore ++; } } ByteArrayOutputStream ba = new ByteArrayOutputStream(); System.setOut(new PrintStream(ba)); Random r = new Random(918273645); for (int i = 0; i

}

System.exit(-1); if (source . matches("(?s).\spublicws+staticWs+W.(*(1+-.*") II source.matches(spublics+statics)) i System.out.println("Detected static variable in your program! Please renove static variables.) System.exit(-1) for (int dotIndex -source.index.; dotIndex !-1; dotIndex source.indexof('. ', dotIndex 1)) ( if ("System.out-println".equals (source.substring(dotIndex 6, dotIndex12)) II "System.out.println.equals(source.substring(dotIndex - 10, dotIndex 8)) l "length".equals(source.substring(dotIndex 1, dotIndex 7)) II Character.isDigit(source.charAt(dotIndex+1))) ( continue System.out.println("Bad dot! Context: + source.substring(Math.max(, dotIndex - 2), Math.nin(dotIndex 2, source.length)))) rowcolumn(source, dotIndex); System.exit(-1); System.out.println( "Passed syntax checks!"); System.out.printin If you don'ts a score, your program didn't get to the end (possibly taking an extrenely long or infinite anount of tim)! PrintStream out Systen.out; MessageDigest md HessageDigest.getInstance(DS int score -8; int eduoddScore-8 int fibbyScore-; int stGenScoree int median]Score - try Part 1: eduodd long[] ns [e, 27, 987654321, -8443, 11121113, -11, 99999999999L, -987654321, -1816548895, -458296238); long] eos 1, 36, 896745238, -9552, 38882, e, 88888888888L, Systen.out.println("Tosting oduodd..."); for (int 0; i

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!