Computer Science Homework Solutions
Problem
#170242

If P is the population on the first day of the year, B is the birth rate, and D is the death rate, the estimated population at the end of the year is given by the formula

If P is the population on the first day of the year, B is the birth rate, and D is the death rate, the estimated population at the end of the year is given by the formula:

P + (B * P)/100 - (D * P)/100

The population growth rate is given by the formula:

B - D

write a program that prompts te user to enter th starting population, birth nd death rates, and n, the number f years The program should then calculate and print the estimated population after n years. Your program must consist of the following functions:

a. growthRate: This function takes as its parameters the birh and death rate, and it returns the population growth rate.

b. estimatedPopuation: This function takes as its parameters the current population, population growth rate, and n, the number of years.
It returns the estimated population after n years.

Your program should not accept a negative birth rate, negative death rate, or a population less than 2.

Solution
What is this?
By OTA - Overall OTA Rating
Yupei Xiong, PhD - 4.8/5
Purchase Cost Now
$2.19 CAD (was ~$19.95)
Included in Download
  • Plain text response
  • Attached file(s):
    • Population.java
$2.19 Instant Download
Add to Cart
Why you can trust BrainMass.com
  • Your Information is Secure
  • Best Online Academic Help Service
  • Students find real academic Success
Related Solutions
Browse