Question: The task is to complete find the rabbits game, where 3 rabbits randomly hide in one of the spaces of 4x4 board .the game will

 The task is to complete find the rabbits game, where 3

The task is to complete find the rabbits game, where 3 rabbits randomly hide in one of the spaces of 4x4 board .the game will first ask the user to enter their name and age In this game, of a 4x4 board Following that, a 4x4 board will be displayed where each space is marked by a letter (from 'A' - 'P'). The program will then prompt the user to select a space and accordingly reveal whether a rabbit was hiding in that space or not. If it is, that space becomes marked with 'X Otherwise, the space becomes empty (no letter is displayed in the space Each time the game starts, the computer will randomly select 3 locations (from the available 16) to put the hiding rabbits in. After that, the player begins by trying each space individually. Once all three rabbits are found, the game terminates and informs the user how many attempts it took him/her to find the three hidden rabbits. The game contains the following 4 Java Classes: Space: This class represents the spaces in the board. The class should have attributes that tell us whether it contains a rabbit, whether that space has already been visited (revealed), and the index (position) of this space in the board (i.e. from index 0 to 15) Board: This class has spaces (16 spaces) Player: This class represents a human player, and contains a namne and age Game: This is the top level class which represents the entire game. It contains a player and a board

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!