Answered step by step
Verified Expert Solution
Link Copied!

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!

image text in transcribed

**** 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.

image text in transcribed

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Databases Illuminated

Authors: Catherine Ricardo

2nd Edition

1449606008, 978-1449606008

More Books

Students also viewed these Databases questions