// CoinExample2.java // // Author: Rahul Simha // Mar, 2008. // // Estimate Pr[3 heads in 5 flips] public class CoinExample2 { public static void main (String[] argv) { // "Large" # trials. double numTrials = 1000000; // Count # times desired outcome shows up. double numSuccesses = 0; Coin coin = new Coin (0.6); // Pr[heads]=0.6 for (int n=0; n