Rat Crossing Desert Instructions Create a program that finds a path across the

Place your order now for a similar assignment and have exceptional work written by our team of experts, At affordable rates

For This or a Similar Paper Click To Order Now

Rat Crossing Desert
Instructions
Create a program that finds a path across the desert grid using rats.
General behavior and specifications of program.
The program will consist of one static class: ControlDriver class, and five object producing classes: Desert class, Cell class, Hole class, RatStatus class, and Rat class. There will also be a static ObjectCreator class that I will provide.
The ObjectCreator class is a static class that will provide Desert, Rat, RatStatus, Cell, and Hole objects when requested. Return values from these requests are interface types. The purpose of this class is to hide the production of objects from the client classes. Client classes will only use interfaces to work with objects.
The ControlDriver class is a static class that will
contain the main() method, which is the entry point into the program
control the timing of the rat moves.It will control the timing of rat movement across the desert by telling the Desert object when a rat can move. ControlDriver will use a loop to notify the Desert to move a rat for each move.
only communicate with the Desert and RatStatus objects through their respective interfaces.
be responsible for initiating the creation of new Rat objects.It will call startRat():RatStatusInterface – Desert and receive back a RatStatus object that contains the unique ID and status for the new rat.
it will maintain a list of current rat IDs.
request the creation of the Desert objectIt will request the creation of a single Desert object by calling ObjectCreator.createNewDesert(), and work through the DesertInterface of the object in running rats through the desert grid.
The Desert will
implement the DesertInterface
create the 2-dimensional CellInterface array for the desert during the construction of a new Desert object.The Desert constructor will query the user for the size of the desert array.
The Desert will create a two-dimensional array to represent the desert. It will be of type CellInterface[][], and will hold Cell and Hole objects. Cell class implements CellInterface,
call ObjectCreator.ceateNewRat() to create a Rat object when prompted and return a unique ID tuple for that Rat object (RatStatus). Note this is not the reference to the Rat object (see Ratstatus class).
start the rat in location (0,0) of the Desert’s array by doing the following task.will hand over a Rat to a cell and remove the Rat’s reference from its own records.
be responsible for keeping track of the rat’s location and movement path(Note: You may delegate keeping track of the rat’s movement path to the Rat. We will discuss this during lecture.)
The Desert, when prompted by the ControlDriver, will:retrieve a Rat from a cell by asking the cell if it has a Rat with a given ID. It receives the Rat’s reference, and the cell will set its storage of that Rat’s reference to null.
prompt the rat for a move direction.
The Desert will calculate the rat’s next location using the move direction provided by the rat and the current location of the rat.
The Desert moves the Rat one cell in a straight line in the direction indicated by the rat.
upon completion of the move, the desert will report back to the ControlDriver with the Rat’s ID and stateThe state is: 0: when the rat is waiting to move, 1: when the Rat is gone(died or escaped), or -1: When the Rat finishes the Desert.
will work with the rat object indicated by the control driver, by calling methods from the rat, using the RatInterface. The rat is an object of the Rat class.
keep rats from falling off the edge. The rats will stay in the grid cell closest to the edge or not move if they are at the edge, but it will still count as a move.
display the final results
retrieve information from the cells for displaying the final re

For This or a Similar Paper Click To Order Now

SmiteWriter
Calculate your paper price
Pages (550 words)
Approximate price: -

Why Work with Us

Top Quality and Well-Researched Papers

We always make sure that writers follow all your instructions precisely. You can choose your academic level: high school, college/university or professional, and we will assign a writer who has a respective degree.

Professional and Experienced Academic Writers

We have a team of professional writers with experience in academic and business writing. Many are native speakers and able to perform any task for which you need help.

Free Unlimited Revisions

If you think we missed something, send your order for a free revision. You have 10 days to submit the order for review after you have received the final document. You can do this yourself after logging into your personal account or by contacting our support.

Prompt Delivery and 100% Money-Back-Guarantee

All papers are always delivered on time. In case we need more time to master your paper, we may contact you regarding the deadline extension. In case you cannot provide us with more time, a 100% refund is guaranteed.

Original & Confidential

We use several writing tools checks to ensure that all documents you receive are free from plagiarism. Our editors carefully review all quotations in the text. We also promise maximum confidentiality in all of our services.

24/7 Customer Support

Our support agents are available 24 hours a day 7 days a week and committed to providing you with the best customer experience. Get in touch whenever you need any assistance.

Try it now!

Calculate the price of your order

Total price:
$0.00

How it works?

Follow these simple steps to get your paper done

Place your order

Fill in the order form and provide all details of your assignment.

Proceed with the payment

Choose the payment system that suits you most.

Receive the final file

Once your paper is ready, we will email it to you.

Our Services

No need to work on your paper at night. Sleep tight, we will cover your back. We offer all kinds of writing services.

Essays

Essay Writing Service

No matter what kind of academic paper you need and how urgent you need it, you are welcome to choose your academic level and the type of your paper at an affordable price. We take care of all your paper needs and give a 24/7 customer care support system.

Admissions

Admission Essays & Business Writing Help

An admission essay is an essay or other written statement by a candidate, often a potential student enrolling in a college, university, or graduate school. You can be rest assurred that through our service we will write the best admission essay for you.

Reviews

Editing Support

Our academic writers and editors make the necessary changes to your paper so that it is polished. We also format your document by correctly quoting the sources and creating reference lists in the formats APA, Harvard, MLA, Chicago / Turabian.

Reviews

Revision Support

If you think your paper could be improved, you can request a review. In this case, your paper will be checked by the writer or assigned to an editor. You can use this option as many times as you see fit. This is free because we want you to be completely satisfied with the service offered.