Question
Using java create a simulation of bears and fish in a river, where the bears eat the fish if possible. The simulation will run in
Using java create a simulation of bears and fish in a river, where the bears eat the fish if possible. The simulation will run in a time steps. At each step, every animal will "decide" how to move using a (pseudo-) random number generator. Is a command line app A one-dimensional river for the array; maximum of 50 cells; size input by user. Random class to generate original bear and fish cells, which way the bear or fish tries to move, and which cell they move to on a collision Bears and fish are numbered for easy validation. Structure Classes: Driver, containing main; Animal; Bear; Fish. Develop your own set of methods for each class; each should do one task. Random class see the text and the Java API. Use a seed if you want to run the exact same simulation again.
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