The document defines a Book class with fields for author, title, and body and getter methods. A Shelf class contains an id, array of Books, and getter methods. A Library class has an array of Shelves and a countAuthor method that counts the number of books by a given author across all shelves.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
14 views
Main Java
The document defines a Book class with fields for author, title, and body and getter methods. A Shelf class contains an id, array of Books, and getter methods. A Library class has an array of Shelves and a countAuthor method that counts the number of books by a given author across all shelves.