Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void removeBook(Integer bookID) {
- Book bookValues = bookMap.get(bookID);
- if (bookValues != null) {
- if (borrowersMap.get(bookValues) == null) {
- bookMap.remove(bookID);
- copiesMap.put(bookValues, copiesMap.get(bookValues) - 1);
- } else {
- System.out.println("Can't remove that book right now, it's lent");
- }
- } else {
- System.out.println("Invalid ID number");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment