@@ -0,0 +1,1213 @@
+public class Runs%0A%7B%0A    public static void main (String%5B%5D args)%0A    %7B%0A        final int FLIPS = 100; // number of coin flips%0A%0A        int currentRun = 0; // length of the current run of HEADS%0A        int maxRun = 0;     // length of the maximum run so far%0A        int totalMax = 0;%0A        Coin c = new Coin();%0A        //for (int ind = 0; ind %3C 100000; ind++)%7B%0A            // Flip the coin FLIPS times%0A            //maxRun = 0;%0A            for (int i = 0; i %3C FLIPS; i++)%0A            %7B%0A                // Flip the coin & print the result%0A                c.flip();%0A                System.out.println(c.toString());%0A                if (c.isHeads()) %7B%0A                    currentRun++;%0A                %7D%0A                else %7B%0A                    currentRun = 0;%0A                %7D%0A                // Update the run information%0A                if (maxRun %3C currentRun) %7B%0A                    maxRun = currentRun;%0A                %7D%0A            %7D%0A            // Print the results%0A            System.out.println(%22The longest consecutive run of heads in 100 flips was: %22 + maxRun);%0A            totalMax += maxRun;%0A        %7D%0A        //System.out.println(%22Expected length of longest run: %22 + totalMax / 100000.0);%0A    //%7D%0A%7D%0A

Create Runs.java