This program will be using a CLASS and Lists. It is called my Farmer Game.The farmer must get his animals (fox, chicken, grain) safely across a river from north bank to sout bank. The farmer makes...



This program will be using a CLASS and Lists. It is called my Farmer Game.



The farmer must get his animals (fox, chicken, grain) safely across a river from north bank to sout bank. The farmer makes trips between the banks and can only take one animal with him each time. Unfortunately, if farmer leaves the fox with chicken (when he is not there), the fox will eat the chicken - game over. Additionally, if farmer leaves chicken and grain together, the chicken eats the grain - game over.



Your program should ask the user what animal the farmer should take, then check to see if animals eat their food, or all animals at south bank. You can also choose to take NOTHING. Once all the animals are at the south bank (without CHICKEN or GRAIN being eaten) you win the game.



Include you INFO class and display your name first, and lastly the user should be able to play multiple plays!!



We can talk about in lecture. I will post a UML diagram of a Farmer class I used.

Oct 06, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here