Project 7, JAVA Programming

Assignment Help:
Iterate through list of Fish. For each fish that isAlive, do the following:
*


* 1. If this fishIsSurroundedByRocks, DO NOTHING, and move on to the next fish.
* (This fish will not turn.)
*


* 2. If this fish''s direction is not equal to one of the codes UP, DOWN, LEFT, or
* RIGHT, then throw an IllegalFishDirectionException, passing this fish''s
* direction to the constructor.
*


* 3. Check whether or not this fish is about to hit a rock if it moves in it''s
* current direction. If it is about to hit a rock, call the fish''s
* setRandomDirection method. Repeat this step until the fish is no longer
* about to hit a rock. Do not make any EXTRA calls to setRandomDirection or
* you will fail our tests!
*/

public void turnFish() {


Related Discussions:- Project 7

Write a java program to take data from excel files, Java program will be ta...

Java program will be take data from excel files (left diagram), and uses can be able to enter the input(middle diagram) in website when run the input the result appear in Pie 2D or

How to execute class with a main() method in a package, Example:  You have...

Example:  You have a class named "Set" in a project folder "e:\myProject" and package named com.zxy.client, will you be able to compile and execute it as it is

Sequence diagrams , Sequence diagrams are communication diagrams which deta...

Sequence diagrams are communication diagrams which detail what messages are sent and when. The sequence diagrams are placed according to time. The time performs as you move from to

What are adding methods, What are adding methods? A subclass isn't rest...

What are adding methods? A subclass isn't restricted to changing the behavior of its superclass. It can also add fully latest techniques and fields that are not shared along wi

Threads, what is meant by thread

what is meant by thread

Component developer to code in java, Component Developer to code in Java: ...

Component Developer to code in Java: Worked for Sansri's Gateway as Software Engineer . Here I Worked as a Component Developer to code in Java and J2EE technologies Here Ensu

Describe synchronization in respect to multithreading, Describe synchroniza...

Describe synchronization in respect to multithreading. With respect to multithreading, synchronization is the capability to control the access of multiple threads to shared res

Are constructors inherited, Are constructors inherited ? Can a subclass ca...

Are constructors inherited ? Can a subclass call the parent class constructor and When?

Create a general design for a class-implement and test, Objectives 1.  ...

Objectives 1.      To design and implement a simple class. 2.      To write a test program to create instances of your class and demonstrate its behaviour. 3.      To col

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd