The idea is to use inheritance, so you would just override the methods. it would be the same method header as the super class. For the knight fish, all you would have to do is have the constructors and override the emptyNeighbors() function.
this function gets the locations that you can move to. so you could create an ArrayList(remember to import java.util.*) and add all the possible moves to the ArrayList. An example of this would be:
ArrayList nbrs = new ArrayList();
nbrs.add(new Location(location().row() - 2, location().col() - 1);
...
you could then take the code at the end of the emptyNeighbors() method from the Fish class and append it to yours. I believe this is the code that is there:
ArrayList emptyNbrs = new ArrayList();
for ( int index = 0; index < nbrs.size(); index++ )
{
Location loc = (Location) nbrs.get(index);
if ( environment().isEmpty(loc) )
emptyNbrs.add(loc);
}
return emptyNbrs;
and there you have it, your first unique fish. One thing to remember, because of inheritance you only have to change a method or two, not all of them. Hope this helps