Results 1 to 5 of 5
- 10-21-2011, 08:35 AM #1
Member
- Join Date
- Feb 2011
- Posts
- 5
- Rep Power
- 0
Need help with a java project! Library check out/in system
The project is about a library system where we can check in/check out items..... right now I am stuck at returning the book back. So this is what I have so far:
I was just wondering that.. we have a .add method, is there a method that is like .clear or .remove.void add(String itemBorrowed)
{
history.add(itemBorrowed);
}
I don't think we do .. so any theories and advice would help.
thanks
- 10-21-2011, 09:07 AM #2
Moderator
- Join Date
- Feb 2009
- Location
- New Zealand
- Posts
- 4,561
- Rep Power
- 11
Re: Need help with a java project! Library check out/in system
What sort of thing is history? Its API documentation will tell you what methods it has which you can call.
- 10-21-2011, 09:45 AM #3
Member
- Join Date
- May 2011
- Posts
- 22
- Rep Power
- 0
Re: Need help with a java project! Library check out/in system
refer APIs
- 10-22-2011, 01:28 AM #4
Member
- Join Date
- Feb 2011
- Posts
- 5
- Rep Power
- 0
Re: Need help with a java project! Library check out/in system
Well, I forgot to mention this, sorry. It needs to match it against the history when returning the book. So when they return the book, the book is removed from history. I am not really sure how to remove it from history. suggestions?
- 10-22-2011, 03:52 AM #5
Senior Member
- Join Date
- Mar 2011
- Posts
- 261
- Rep Power
- 3
Re: Need help with a java project! Library check out/in system
Looks like "history" is an ArrayList.
Let's you return "Romeo and Juliet", you're going to use:
and you will remove the first occurrence of "Romeo and Juliet".Java Code:history.remove("Romeo and Juliet");Last edited by Solarsonic; 10-22-2011 at 03:55 AM.
Similar Threads
-
First JAVA project: scheduling system
By dee-u in forum New To JavaReplies: 18Last Post: 06-29-2011, 09:59 AM -
Library Assistant project help
By jbarreto1 in forum New To JavaReplies: 4Last Post: 04-27-2011, 10:57 PM -
help with library sub system
By clydedoris in forum New To JavaReplies: 12Last Post: 07-12-2010, 10:58 AM -
How to check whether a default browser is opened in the operating system?
By stempel1984 in forum Advanced JavaReplies: 6Last Post: 06-07-2010, 03:47 PM -
problem trying to log on to my video library system
By warship in forum New To JavaReplies: 0Last Post: 07-18-2007, 02:33 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks