public class ExponentialCDF2 { public static void main (String[] argv) { Function F = makeExponentialCDF (); double a = 0, b = 3; // Limit this to the interval [0,3] int M = 20; // Number of intervals. double delta = (b-a) / M; // Interval size. double exValue = 0; // INSERT YOUR CODE HERE. System.out.println ("Exponential ex: " + ex); } static Function makeExponentialCDF () { double a = 0, b = 3; int M = 50; // Number of intervals. double delta = (b-a) / M; // Interval size. double[] intervalCounts = new double [M]; double numTrials = 1000000; for (int t=0; t