Question

Java

Create a Java class (program) called PopulationGrowth.java. This program will compute the growth rates of a population over time. The program should take the following inputs from the user:

  • p, the initial population size in the range [1...1000]

  • b, the per capita birth rate in the range [0.0...1.0)

  • d, the per capita death rate in the range [0.0...1.0)

  • time_span, the number of years for which to compute population totals

Once the input is finished, the program must compute the population for the next time_span years and display each year's total to the screen. Use the formulas provided in the previous section to perform the necessary computations. The output report should have two columns of information: Year and Population Size. Remember that the first year is considered Year 0, not Year 1.

You must use a while loop for your calculations! Be aware that it is possible for the population to go extinct (i.e. have a population ≤ 1.0); at that point you must stop processing, close the report, and inform the user. Two test cases are provided below:

Test Case #1 (Growth - Increased Fertility)

Enter the initial population size [1-1000]: 100
Enter the birth rate [0.0...1.0): 0.5
Enter the death rate [0.0...1.0): 0.4
Enter the number of years [1...100): 10

      YEAR     POPULATION

         0            100
         1            110
         2            121
         3            133
         4            146
         5            160
         6            176
         7            193
         8            212
         9            233

Test Case #2 (Extinction - Disease Epidemic)

Enter the initial population size [1-1000]: 100
Enter the birth rate [0.0...1.0): 0.4
Enter the death rate [0.0...1.0): 0.7
Enter the number of years [1...100): 15

      YEAR     POPULATION

         0            100
         1             70
         2             49
         3             34
         4             23
         5             16
         6             11
         7              7
         8              4
         9              2
        10              1
        11              0

The population has gone extinc


0 0
Add a comment Improve this question Transcribed image text
Request Professional Answer

Request Answer!

We need at least 10 more requests to produce the answer.

0 / 10 have requested this problem solution

The more requests, the faster the answer.

Request! (Login Required)


All students who have requested the answer will be notified once they are available.
Know the answer?
Add Answer to:
Java
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Similar Homework Help Questions
  • In C++ Transient Population Populations are effected by the birth and death rate, as well as...

    In C++ Transient Population Populations are effected by the birth and death rate, as well as the number of people who move in and out each year. The birth rate is the percentage increase of the population due to births and the death rate is the percentage decrease of the population due to deaths. Write a program that displays the size of a population for any number of years. The program should ask for the following data: The starting size...

  • Death rate > Birth or death rate (per capita) Birth rate - 1 Population Density ove...

    Death rate > Birth or death rate (per capita) Birth rate - 1 Population Density ove is a figure depicting density-dependent per capita birth and death rates of a single population. hich of the following statements is an ACCURATE conclusion about this population? This population will explode into an inñnite size as density increases. This population will decline to extinction if the population size is too small. This population is regulated by density-dependent negative feedback. This population exhibits exponential growth

  • P3.4 Population. In a population, the birth rate is the percentage increase of the population due...

    P3.4 Population. In a population, the birth rate is the percentage increase of the population due to births, and the death rate is the percentage decrease of the population due to deaths. Write a program that displays the size of a population for any number of years. The program should ask for the following data: The starting size of a population The annual birth rate The annual death rate The number of years to display Write a function that calculates...

  • Populations grow when the number of births in a population is greater than the number of...

    Populations grow when the number of births in a population is greater than the number of deaths in the same population and there is no net movement of individuals into or out of the population. This is to say that all else being equal, populations grow when the birth rate exceeds the death rate and shrink when death rates exceed birth rates. When the number of births is equal to the number of deaths in a population, and again, there...

  • QUESTION 4 This graph shows how the growth rate of a certain population changes with population...

    QUESTION 4 This graph shows how the growth rate of a certain population changes with population size. A A If the population starts at size "x", what will be the eventual size of the dN/dt population (choose A-E)? OOOO QUESTION 5 This graph shows the per-capita birth and death rates for a certain population as a function of population size, N.  If the population starts at size "x", what will be the eventual size of the population (choose A-E)?...

  • 1. Single Species Growth Consider a single population where the per capita birth rate declines as...

    1. Single Species Growth Consider a single population where the per capita birth rate declines as the population size grows. Let N(t) be the population size at time t. Consider the following assumptions: (A1) The environment in which the species lives (including the climate, other species and the availability of resources like food, etc.) remains constant. (A2) The per capita birth rate is for some b>0. (A3) The per capita death rate is a constant d > 0. Note: This...

  • Suppose that the carrying capacity for Arctic hares in a particular ecosystem is estimated to be...

    Suppose that the carrying capacity for Arctic hares in a particular ecosystem is estimated to be 1000. Biologists survey the population and find that population numbers are currently 450. If the annual birth rate of the population is 15 per capita, and the annual death rate is 8 per capita, what is the overall growth rate of this population?

  • A particular bird species found in a certain region is subject to typical density-dependent (logistic) population...

    A particular bird species found in a certain region is subject to typical density-dependent (logistic) population growth.  If the birth rate declines with increasing N according to the function birth rate b= -0.003N+3.4 and death rate increases with N according to the function d=.001N + 0.4.  What is the maximum rate of growth,  ‘rm’ for this population and find out the carrying capacity of this species, if the initial population size is 1800?

  • Imagine that in 1970, we re-introduce 100 endangered jackalopes to a habitat. The new population has...

    Imagine that in 1970, we re-introduce 100 endangered jackalopes to a habitat. The new population has a natural age/sex population structure. The habitat is surrounded by a tall fence, so no jackalopes may enter or leave the area after re-introduction has taken place. Population controls including diseases, parasites and hungry coyotes are all present. Still, the population increases after reintroduction. The maximum lifespan for a jackalope is 5 years. the per capita growth Complete this sentence: Per capita birth rates...

  • are predator prey relationships density dependent Review View Help Ink to Drawing Ink Shape Math Canvas...

    are predator prey relationships density dependent Review View Help Ink to Drawing Ink Shape Math Canvas Replay Drawing Tools Convert Insert Replay 3. Suppose the population density of a sample of deer is 50 per square kilometer. Assuming that the population is uniformly distributed what would the population size be if the deer encompassed an area that was 20km x 200km? Round to the nearest whole number 4. There are 252 deer in a population. There is no net immigration...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT