hello,
in addition to that:
take for example the fishs you programmed recently.
A class "Fish" allows you to write better, more understandable Code.
A class "Fish" is a
package of what a fish is, what it looks like (size, color), where it is (x and y) and what it can do (swim, die, collide...) etc. as you want it.
So you got all neatly together
in one place.
A class is the blue print, the idea of a fish.
From this blue print you derive a actual fish like fishBob and fishJack (which happens outside the class and uses it). To do so use "new":
http://www.processing.org/reference/new.html
Thus you can say (which again happens outside the class and uses it) stuff like
- fishBob.fishColor = color(3,3,244);
or
- fishBob.swim();
when you have a property fishColor and a method (what the fish can do) swim (within the class).
So the actual fishName (it can also be an array or ArrayList) plus a dot plus a property or method.
Hope this helps.
Greetings, Chrisir