Question: Library Application Overview Library management system is a simple application to be built using the Balanced Binary Search Tree (TreeMap) in Java. The program will
Library Application
Overview
Library management system is a simple application to be built using the Balanced Binary Search Tree
(TreeMap) in Java. The program will provide some basic book management tasks like, insertion, deletion,
sorting regarding specific book information, and searching for books matching specific query. Additionally, the
program should have a list of people, each of whom may be interested in one or more books, so theres a
mapping between the two entities in this simple program: User & Book.
This project offers you the opportunity to gain valuable hands-on experience. Youll try to ,efficiently,
practice all the basic operations and algorithms we have discussed along the term.
Java Classes
1. TreeMap
A Red-Black (balanced BST) tree based NavigableMap implementation. The map is sorted according to
the natural ordering of its keys, or by a Comparator provided at map creation time, depending on which
constructor is used. This will insure log(n) time complexity for most of the operations.
You can see this class and how to use it here
2. HashMap
This data structure to be used for mapping each user to his list of books. also each user with its personal
data (i.e. its Object).
You can see this class and how to use it here
3. Book
This class contains all the required information for a book, you can follow this ADT.
| book_id | int |
| title | String |
| author | String |
| quantity | int |
| isbn | long |
| publisher | String |
| total_pages | int |
| rating | float |
| published_date | String |
4. User
Following ADT for the user class, later the description of its usage.
USER
| id | int |
| String | |
| password | String |
| first_name | String |
| last_name | String |
| age | int |
Requirements
-
The application provides user signUp/login functionality using simple GUI and the suitable data
structure: HashMap.
-
The application provides a dashboard that contains all the books with their information (those have
quantity > 0).
-
The application provides the following operations on the books: insert, get, delete, search. You have to
use a data structure that does these operations efficiently, like TreeMap.
-
The application provides a way to buy a book by the user that is already logged in.
-
The application provides a way to display the books that a user already bought.
-
The application provides a way to logout and return to the login page, you should keep all the work
saved at least in RAM.
Additional (Optional)
Try to use files for permanent data storage BUT don't use any kind of database.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
