Both algorithms, random input generation, correctness tests, and runtime measurements are implemented in ClosestPair.java. HTML/JavaScript displays the Java-generated results and recorded recursion.