Hello, im new to this forum. I have an assignment for class that I am really confused with, please can you guys take a look and help me with the code or point me in the right direction, I am not asking anyone to do it for me...I ofcoarse wouldn't mind that :) but here's the assignment:
Objective: To practice using iteration and selection constructs in Java, and writing a class.
Write a class RabbitPopulation that simulates the growth of a rabbit population. The rules are as follows:
1. Start with one pair of rabbits (i.e., one male and one female)
2. Rabbits are able to mate at the age of one month. A month later, the female produces a pair of rabbits (one male, one female).
3. Assume that a female rabbit always produces a pair of rabbits every month from the second month on.
4. Assume that rabbits never die of old age.
5. Implement a method waitAMonth that updates the population as if one month passed.
6. Implement a method hunt that updates the population as if hunters killed 10 percent of the pairs (both immature and mature).
7. Implement a method getPairs that prints the current number of rabbit pairs.
8. Write a test program that shows the growth of the rabbit population for ten months in two situations:
in the case that no hunting occurs
in the case that hunting occurs once each month.
Hint: Keep one instance field for the newborn rabbit pairs and another one for the rabbit pairs that are at least one month old.
Thank you so much for taking the time to read it and helping me out...any help would be appreciated!