// ******************************************************************** // Runs.java // // Finds the length of the longest run of heads in 100 flips of a coin. // ******************************************************************** public class Runs { public static void main (String[] args) { final int FLIPS = 100; // number of coin flips int currentRun = 0; // length of the current run of HEADS int maxRun = 0; // length of the maximum run so far // Create a coin object using a reference variable named myCoin // Flip the coin FLIPS times for (int i = 0; i < FLIPS; i++) { // Flip the coin & print the result // if heads then increment variable currentRun // if tails then if currentRun > maxRun, set maxRun to currentRun // and set currentRun to 0 } // Print the results } }