Vincent Broeke

Greenhorn
+ Follow
since May 21, 2013
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Vincent Broeke

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
10 years ago