Question: In Programming Challenge 9 of Chapter 4 you wrote a population class that predicts the si/cof a population of organisms after a number of days.

In Programming Challenge 9 of Chapter 4 you wrote a population class that predicts the si/cof a population of organisms after a number of days. Modify the class so it uses a recursive method instead of a loop to calculate the number of organisms.

This is the question from chapter 4

Write a program that will predict the si/e of a population of organisms. The program should ask for the starting number of organisms, their average daily population increase (as a percentage), and the number of days they will multiply. For example, a population might begin with two organisms, have an average daily increase of 50 percent, and will he allowed to multiply for seven days. The program should use a loop to display the si/e of the population for each day.

Input Validation: Do not accept a number less than 2 for the starting size of the population. Do not accept a negative number for awrage dady population increase. Do not adept a number less than I for the number of days they will multiply

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!