Population
In a population, the birth rate and death rate are calculated as follows:
Birth Rate = Number of Births. Population
Death Rate = Number of Deaths. Population
For example, in a population of 100,000 that has 8,000 births and 6,000 deaths per year, the birth rate and death rate are:
Birth Rate = 8,000. 100,000 = 0.08
Death Rate = 6,000. 100,000 = 0.06
Design a Population class that stores a population, number of births, and number of deaths for a period of time. Member functions should return the birth rate and death rate. Implement the class in a program.
Input Validation: Do not accept population figures less than 1, or birth or death numbers less than 0.
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.