Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

PART# 1 - Rabbits or Carrots Game In this PART# 1 , you are NOT ALLOWED TO USE ARRAYS. You can only use variables (

PART#1- Rabbits or Carrots Game
In this PART#1, you are NOT ALLOWED TO USE ARRAYS. You can
only use variables (including String) to store data, selection statements (if,
else-if, switch), while/for/do-while loops, and methods. You are not
allowed to use other complex data structures (including arrays and
ArrayLists), or classes to implement PART#1. You will implement this part
in a java file called RabbitGamePart1.java.
In this project, you will design and implement a game in which we have
rabbits and carrots in a triangular game area. The user gives the size of the
game area -S-. Let's assume that the user gives S as 6. You will have a
game area as follows:
The user determines the size of the game area. It can be bigger or smaller.
In the game area, you will have the following characters and rules;
Place 3 rabbits at random locations,
Place carrots at locations where i and j are both even numbers,
Place 2 rats at random locations,
Place 2 exit rooms at random locations (one goes to Heaven, the other
goes to Hell,
Place one player in a random location.
image text in transcribed

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

Case Studies In Business Data Bases

Authors: James Bradley

1st Edition

0030141346, 978-0030141348

More Books

Students also viewed these Databases questions

Question

10. Describe the relationship between communication and power.

Answered: 1 week ago