Question: Program must be in Java lanugage: In a predator-prey simulation, you compute the populations of predators and prey, using the following equations: Here, A is

Program must be in Java lanugage: In a predator-prey simulation, you compute the populations of predators and prey, using the following equations:

Program must be in Java lanugage: In a predator-prey simulation, you compute

Here, A is the rate at which prey birth exceeds natural death, B is the rate of predation, C is the rate at which predator deaths exceed births without food, and D represents predator increase in the presence of food. Write a program that prompts users for these rates, the initial population sizes, and the number of periods. Then print the populations for the given number of periods. As inputs, try A = 0.1, B = C = 0.01, and D = 0.00002 with initial prey and predator populations of 1,000 and 20.

Please Answerin Java

4. In a predator-prey simulation, you compute the populations of predators and prey, using the following equations: preyn+1 = prey,, x (1 + A-B predn ) predn+1 = pred, x (1-C + D prey.) Here, A is the rate at which prey birth exceeds natural death, B is the rate of predation, C is the rate at which predator deaths exceed births without food, and D represents predator increase in the presence of food. Write a program that prompts users for these rates, the initial population sizes, and the number of periods. Then print the populations for the given number of periods. As inputs, try A = 0.1, B = C = 0.01, and D = 0.00002 with initial prey and predator populations of 1,000 and 20

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!