You want the fish that are caught by a Fisher. Now, you have that information in the array you can retrieve with getFishCaught
.
Now look what you try to do instead:
Fish f = new fish[i];
System.out.println("A " + f.getSize() + " cm " + f.getFishCaught());
In the first line, you try to make a new array of fish
, but it is, of course Fish
(fish
is the symbol that couldn't get resolved.). Then you try to assign the array reference to a single Fish
f. But an array of Fish is not the same as a Fish. For example, you can eat a Fish, but not a Fish container, you know.
What you probably want is this:
Fish f = (getFishCaught())[i]; // get the i-th Fish caught
System.out.println("A " + f.getSize() + " cm " + f.getXXX());
where getXXX is a method of Fish
that returns the Fishs species. (Since you didn't show the FIsh class, I can't know the exact name of this getter).