End of the Third Month

Classic programmed-learning exercises, refreshed for modern Java and presented in the current MrStyner.com portfolio style.

Modern Java noteThis archive has been refreshed for Java 25 LTS. Core language concepts remain useful, while outdated setup instructions and browser-era Java are labeled or replaced. Java 26 is the current feature release; Java 25 is used here as the stable teaching baseline.

Answer:

The one mature female rabbit gives birth to one baby female rabbit during the third month. So there is a total of two female rabbits (and several males).

End of the Third Month

The new chart shows this. At the end of month three there is 1 mature female rabbit and 1 baby female rabbit for a total of two female rabbits.

N12345 678910
Females112        

If you look under month 2 you see how many mature female rabbits there are in month 4. Since it takes rabbits two months to become mature, every rabbit listed for month N will be mature in month N+2. Each one of these rabbits will produce one new baby rabbit in month N+2.

If you look under month 3 you see how many total female rabbits there are at the start of month 4.

Add the rabbits in month 2 (which equals the number of babies born during month 4) to the rabbits in month 3 to get the total number of rabbits ate the end of month 4.

QUESTION 11:

How many rabbits are there at the end of month 4?