public class growth
{
    public static void main (String[] args)
    {
	/*
	 * y = a(1+r)^x
	 */

	double y = 0;
	double a = 1; // initial value
	double r = 0.3; // infection rate
	int x = 0;
	int t = 100;
	int p = 0;
	int mingle = 0; // a fudge factor to represent population mingling or not
	int isolate = 0; // a fudge factor to represent population that isolates

	for (int i = 0; i < args.length; i++)
        {
	    if ("-help".equals(args[i]))
	    {
		System.out.println("growth [-infection <value>] [-time <value>] [-population <value>] [-mingle <value>] [-help]");
		System.exit(0);
	    }

	    /**
	     * The act of mingling increases the chance of cross pollination
	     * of the infection, i.e., it increases the infection rate.
	     */

	    if ("-mingle".equals(arg[i]))
	    {
		Double m = Double.parseDouble(args[i+1]);

		mingle = m.doubleValue();
	    }

	    if ("-population".equals(args[i]))
	    {
		Integer pop = Integer.parseInt(args[i+1]);

		p = pop.intValue();
	    }
	    
	    if ("-infection".equals(args[i]))
	    {
		Double inf = Double.parseDouble(args[i+1]);

		r = inf.doubleValue();
	    }

	    if ("-time".equals(args[i]))
	    {
		Integer time = Integer.parseInt(args[i+1]);

		t = time.intValue();
	    }
	}
	     
	System.out.println("Time: 0\nInfected: "+a);

	for (int i = 1; i < t; i++)
	{
	    System.out.println("Time: "+i);

	    y = a * (1+r);
	    
	    System.out.println("Infected: "+y);

	    a = y;

	    if (p != 0)
	    {
		if (a > p)
		{
		    System.out.println("It took "+i+" iterations to saturate the population");
		    System.exit(0);
		}
	    }
	}
    }
}

@@ -213,19 +213,22 @@
 p = 0;%0A%09
-int
+double
  mingle 
@@ -225,24 +225,26 @@
 le mingle = 
+0.
 0; // a fudg
@@ -293,19 +293,22 @@
 or not%0A%09
-int
+double
  isolate
@@ -310,16 +310,18 @@
 olate = 
+0.
 0; // a 
@@ -567,16 +567,35 @@
 %3Cvalue%3E%5D
+ %5B-isolate %3Cvalue%3E%5D
  %5B-help%5D
@@ -807,16 +807,17 @@
 uals(arg
+s
 %5Bi%5D))%0A%09 
@@ -894,32 +894,252 @@
 alue();%0A%09    %7D%0A%0A
+%09    /**%0A%09     * The act of isolating reduces the changes of cross pollination.%0A%09     */%0A%0A%09    if (%22-isolate%22.equals(args%5Bi%5D))%0A%09    %7B%0A%09%09Double iso = Double.parseDouble(args%5Bi+1%5D);%0A%0A%09%09isolate = iso.doubleValue();%0A%09    %7D%0A%0A
 %09    if (%22-popul

Update growth.java