Showing object details of another related class
I have 2 classes - Library and Lender.
In the library class, I can create multiple objects with each object storing details of a particular book like author, publisher, title,etc.
Now the Lender class is related to/dependent on Library class. In the Lender class, I have a method called displayAllBooks which I have to use to display all the books(or objects) from the Library class.
I have tried to do this but was unsuccessful. How do I implement this especially the displayAllBooks method ?