Hi, I am new to
Java programming and studying it at school.
We have been given an assignment to create a small library, with the following classes Library, Book, Author and Copy. With a given class Biblio which has predefined code and adds the books to the class book in an arraylist in Class Copy.
The UML Domain is attached so you know the flow of the classes
Everything is working fine and the generated output is correct.
There is just one method in class Library that is not working, the int method has to count the number of Copy's based on the Class Book (
String):
I have to go through the Arraylist in Class Copy and look for a specific book and return the number of copy's.
Sorry for the Dutch language in the code.
I have tried multiple steps using a for loop
Now I have found a similar post the uses hashset, I have tried below code but the return comes back with 0. (There are 3 copy's)
Any help is much appreciated. I have added the complete code