01
Assignment Overview
Build a comprehensive Library Management System that utilizes the full power of Java Collections. You'll work with different collection types to manage books, members, and borrowing records.
Skills Applied: Collections Framework (5.1), Generics (5.2), and Streams API (5.3) from Module 5.
Lists & Sets
ArrayList, LinkedList, HashSet, TreeSet
Maps
HashMap, TreeMap, LinkedHashMap
Streams
Filter, map, reduce, collect operations
02
Requirements
Part 1: Book Management with Lists (35 points)
- Create a
Bookclass implementingComparable<Book> - Use
ArrayList<Book>to store library books - Implement sorting by title, author, and publication year
- Create custom
Comparatorimplementations
Part 2: Member Management with Maps (35 points)
- Create a
Memberclass with unique member ID - Use
HashMap<String, Member>for member lookup by ID - Use
TreeMapto maintain sorted member list by name - Track borrowed books per member using
Map<Member, List<Book>>
Part 3: Unique Categories with Sets (30 points)
- Use
HashSetto track unique book categories - Use
TreeSetto maintain sorted genre list - Implement set operations: union, intersection, difference of book collections
Part 4: Stream Operations (50 points)
- Filter books by category, year, or availability
- Map operations to transform book data
- Calculate statistics: total books, average rating, most borrowed
- Group books by category using
Collectors.groupingBy() - Find top 10 most borrowed books using streams
03
Submission Guidelines
Folder Structure: Submit all files in a folder named
assignment5_yourname
Required Files:
Book.java- Book model with ComparableMember.java- Member modelBookComparators.java- Custom comparatorsLibraryManager.java- Main logic with collectionsStreamOperations.java- Stream-based queriesMain.java- Demo programREADME.txt
Ready to submit? Make sure all stream operations are working correctly!
Submit Now
04
Grading Rubric
| Criteria | Points | Description |
|---|---|---|
| Book Management (Lists) | 35 | Proper List usage with Comparable/Comparator |
| Member Management (Maps) | 35 | Correct Map implementations and lookups |
| Category Tracking (Sets) | 30 | Set operations and uniqueness handling |
| Stream Operations | 50 | All stream queries working correctly |
| Total | 150 |