public class Assertions2 { public static int threeHeads(Random rand) { int flip = 1; int heads = 0; int count = 0; // Point A while (heads < 3) { // Point B flip = rand.nextInt(2); // flip coin if (flip == 0) { // heads heads++; // Point C } else { // Point D heads = 0; } count++; } // Point E return count; } } /* flip == 0 heads == 0 flip > heads Point A N A A Point B S S S Point C A N N Point D N S S Point E A N N */