Results 1 to 3 of 3
 02122012, 10:58 PM #1Member
 Join Date
 Feb 2012
 Posts
 2
 Rep Power
 0
Help writing a program to study population growth
I am currently working on a program for class:
"Write a program to study the following simple model for population growth, which might be applied to study fish in a pond, bacteria in a test tube, or any of a host of similar situations. We suppose that the population ranges from 0 (extinct) to 1 (maximum population that can be sustained). If the population at time t is x, then we suppose the population at time t + 1 to be r*x*(1  x), where the argument r, known as the fecundity parameter, controls the rate of growth. Start with a small population say, x = 0.01 and study the result of iterating the model, for various values of r. For which values of r does the population stabilize at x = 1  1/r? Can you say anything about the population when r is 3.5? 3.8? 5?"
Here is what I have so far, can someone please help me figure out what I am doing wrong?
public class Chaos
{
public static void main(String[] args)
{
double t = Double.parseDouble(args[0]);
double x = Double.parseDouble(args[1]);
double r = Double.parseDouble(args[2]);
for(x = 0.01; x >= 0 && x <= 1; t++) {
x = (r*x*(1  x));
System.out.println(1  1/r);
}
}
}
 02122012, 11:18 PM #2
 Join Date
 Sep 2008
 Location
 Voorschoten, the Netherlands
 Posts
 14,422
 Blog Entries
 7
 Rep Power
 29
Re: Help writing a program to study population growth
What sort of 'wrongness' did you experience?
kind regards,
JosBuild a wall around Donald Trump; I'll pay for it.
 02122012, 11:26 PM #3Member
 Join Date
 Feb 2012
 Posts
 2
 Rep Power
 0
Similar Threads

Help with writing my own program
By DMarsh12 in forum New To JavaReplies: 4Last Post: 12302011, 04:34 AM 
How Search Is Accelerating The Growth of Video In The Enterprise
By petermatilda in forum Java SoftwareReplies: 0Last Post: 11152010, 12:37 PM 
Combo Box Population
By barusk in forum Java AppletsReplies: 1Last Post: 03202009, 02:48 PM 
Due Tommorow Writing a Program Please Help
By gallimaufry in forum New To JavaReplies: 4Last Post: 10232008, 04:15 AM 
Java Developer Needed/Perm/NJ/Brokerage...lots of room for growth
By shagans982 in forum Jobs OfferedReplies: 1Last Post: 08092008, 12:55 PM
Bookmarks