Advanced extends and implements
I have two classes, GeneticAlgorithm and GeneticAlgorithmDemo, I can post the source if anyone wants but suffice to say, GeneticAlgorithm defines several methods and several abstract methods. GeneticAlgorithmDemo extends GeneticAlgorithm and of course provides implementations of the abstract methods in GeneticAlgorithm.
GeneticAlgorithm defines a two dimensional array of Objects, i also have an interface called GAObject which demands implementation of some methods.
Because I dont know what types of Objects I want to use in the two dimensional array in the subclass I cant define what type of object (other than object itself) populates the array in the superclass, I know that i want the contents of the array in the subclass to be free to define its own superclass but i do want the objects (whatever they may be) to be forced to implement the GAObject interface.
Here is what I ask, is there a way to force a subclass to define a variable (an array) which overrides the corresponding variable in the superclass AND that whatever populates that array (a custom defined object that is free to extend whatever it wants, but is forced to implement the interface GAObject)