I have two classes, ClassA
and ClassB
, as well as a \"many to many\" AssociationClass
. I want a structure that holds the associations
Using your AssociationClass, you could just have ClassA and ClassB both contain a reference to AssociationClass:
private AssociationClass association;
Or, a different method...
ClassA can contain:
private List classBList;
and ClassB can contain:
private List classAList;
By implementing this, you can access your associations from within the associated class.