Answered step by step
Verified Expert Solution
Question
1 Approved Answer
THIS IS JAVA PROGRAM. THANK YOU! **** Additional Requirements ***** - Enter the number for the rabbit and wolves in the simulation in the main
THIS IS JAVA PROGRAM. THANK YOU!
**** Additional Requirements *****
- Enter the number for the rabbit and wolves in the simulation in the main method.
- Create a method called biosphereDay that calls on another method wolfEat that decreases the number of rabbits by one for each wolf in the biosphere. At the end of the bioshpereDay method, the number of wolves and rabbits left in the biosphere is printed along with the days past.
- Run the bioshpereDay method until the number of rabbits in the biosphere is 0.
Create a computer simulation that gets the starting number of wolves and rabbits from the user, and then prints out the number of wolves and rabbits that would be left in the biosphere at the end of each day. The program should end when the number of wolves or rabbits is 0 . Rabbits vs Wolves Enter the number of wolves in your biosphere: 4 Enter the number of rabbits in your biosphere: 18 At the end of day 1 there are 14 rabbits, and 4 wolves. At the end of day 2 there are 10 rabbits, and 4 wolves. At the end of day 3 there are 6 rabbits, and 4 wolves. At the end of day 4 there are 2 rabbits, and 4 wolves. At the end of day 5 there are 0 rabbits, and 4 wolves
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started