In my program I have 4 classes zoo, animal, aquatic and flying.
Zoo uses an array of animal class objects. Aquatic and flying extends the animal class.
This is just an example
CLASS FIELDS
ANIMAL
-name
AQUATIC
-environment
FLYING
-number of wings
If I want to print only the flying type.
FOR i=0 TO total number of animals CHANGEBY 1
IF (Animal[i].getEnvironment).equals(land)
OUTPUT Flying.toString()
Can I do something like this?