Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

do it in java please Create class Carnivore,Herbivore and Plant. Carnivore and Herbivore need energy to survive. Carnivore eats Herbivore and Herbivore eats Plant to

image text in transcribeddo it in java please

Create class Carnivore,Herbivore and Plant. Carnivore and Herbivore need energy to survive. Carnivore eats Herbivore and Herbivore eats Plant to get energy Moving and reproduction consumes energy. Carnivores and Herbivores will reproduce a newborn if they are on a certain age and certain level of energy. The child will be placed next to the parent The simulation environment is a 2D grid (nxn cells). Plants grow at random time, random locations. Herbivores and Carnivores can move to North, South, East, West. Setup a 16 x 16 grid, initialize it by random numbers of Carnivore, Herbivore and Plants. Run it for a specific numbers of iterations (32 is the min). Print the result for each iteration on the console. Carnivore char: @ Herbivore char: & Plant char: # Free space char: - You should be completely object oriented Create class Carnivore,Herbivore and Plant. Carnivore and Herbivore need energy to survive. Carnivore eats Herbivore and Herbivore eats Plant to get energy Moving and reproduction consumes energy. Carnivores and Herbivores will reproduce a newborn if they are on a certain age and certain level of energy. The child will be placed next to the parent The simulation environment is a 2D grid (nxn cells). Plants grow at random time, random locations. Herbivores and Carnivores can move to North, South, East, West. Setup a 16 x 16 grid, initialize it by random numbers of Carnivore, Herbivore and Plants. Run it for a specific numbers of iterations (32 is the min). Print the result for each iteration on the console. Carnivore char: @ Herbivore char: & Plant char: # Free space char: - You should be completely object oriented

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

Database Driven Web Sites

Authors: Joline Morrison, Mike Morrison

2nd Edition

? 061906448X, 978-0619064488

More Books

Students also viewed these Databases questions