I need to build a class that will represent a sort of library that can manage a collection of books. The
library has opening hours, an address and a book collection (i.e., arrays of Book objects). Now i am quite new to progamming and am trying some stuff out. But not really getting in the right way i think.
To make this i need to have to implement following methods:
addBook(new Book(title)));//this should add a book to an array, also having a boolean or something else i could use in a for loop that will eventually print out available books
borrowBook(title);//giving the title this will set a boolean borrowed or some value to be true, really needs to correspond to the title though
printAvailableBooks();//print all the books that arent borrowed, coming from the array with the book objects
returnBook(title);//giving the title this will set a boolean borrowed or some value to be false, really needs to correspond to the title though
If any of you could maybe give me some pointers getting on the way. What i have tried so far is not worth that much, but here it is:
Thanks for taking time to respond in advance.
Kind regards,
Vincent