Hello,
I've been searching quite a while for an answer but seeing as I could not find it, I decided to come here, hoping someone could help me.
Say I have two classes, Author and Book, and I have 2 author objects and 10 book objects. I would like to know how to do two things:
1) Make some sort of connection that makes clear that author X wrote books A, B and F.
2) Call a method from a book object that is connected to an author.
Seeing as I don't know which books will be connected to an author, is there some way to call a method of an object bases on a variable object name? Something like call the getFirstPage() method for every book that is linked to author X?
Many thanks in advance!