0% found this document useful (0 votes)
3 views7 pages

Project2 libraryManagementSystem

Uploaded by

bao2442006
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views7 pages

Project2 libraryManagementSystem

Uploaded by

bao2442006
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Project — Library Management System

1. Context
A local community library aims to modernize its operations by implementing a simple
computer-based system. This system will manage book information, library members,
and the borrowing/returning of books. The primary goal is to improve efficiency in
managing the library’s collection and member activities, ensuring accurate record-
keeping and easy access to information.
The system should store detailed information such as book ID, title, author, genre,
publication year, and current status (available/borrowed). For members, it needs to
track member ID, name, contact information, and a list of currently borrowed books.
The system must also manage borrowing transactions, including the book borrowed,
member, borrow date, and return date.
Library staff will use the system to register new books and members, process
borrowing and returning of books, and generate various reports. Key business rules,
such as unique identification for books and members, checking book availability
before borrowing, and calculating overdue fines, must be enforced.
Overall, the system seeks to enhance the library’s service quality, streamline daily
tasks, and provide better insights into library usage.

2. Users
Librarian Staff – Manages books, members, and borrowing/returning
transactions.
3. Functional Requirements
Book Management
1. Add new book with details (ID, title, author, genre, publication year, quantity, …).
2. Update book information.
3. Remove a book (only if not currently borrowed).
4. View all books.
5. Search books by title, author, or genre.
Member Management
1. Add new member (ID, name, phone, email, …).
2. Update member information.
3. Remove a member (only if no outstanding borrowed books).
4. View all members.
5. Search members by name or ID.
Borrowing Management
1. Borrow a book (record book ID, member ID, borrow date).
2. Return a book (record return date, calculate fine if overdue).
3. View all borrowed books (currently out).
4. View borrowing history for a specific member.
Reporting
1. Generate a list of all currently borrowed books.
2. Generate a list of overdue books.
3. List most popular books (based on borrowing frequency).
4. List members with the most borrowings.
4. Business Rules
BR1: Each Book ID and Member ID must be unique and cannot be modified.
BR2: Book title, author, and genre must not be empty.
BR3: A member must exist before borrowing a book.
BR4: A book must be available (stock > 0) before it can be borrowed.
BR5: A book can only be borrowed if the member has not exceeded their
borrowing limit (e.g., 3 books at a time).
BR6: Borrow date must be current or in the past; return date must be after
borrow date.
BR7: Overdue fine is calculated based on the number of days past the due date
(e.g., 5,000 VND per day).
BR8: Book stock is reduced upon borrowing and increased upon returning.
BR9: All inputs must be validated before processing.
BR10: Popular books are determined by the total number of times they have
been borrowed.

5. OOP Requirements
Encapsulation (e.g., Book , Member , BorrowingTransaction classes).
Inheritance (e.g., RegularMember vs PremiumMember with different borrowing
limits or fine rates).
Polymorphism (e.g., overriding calculateFine() method in Member
subclasses).
Collections (e.g., List or Map to store books, members, and transactions).
Exception handling (e.g., for invalid input, book not found, member not found).
Class diagram before coding.

6. Console UI Requirements
Menu-based interface:
Manage Books
Manage Members
Borrowing/Returning
Reports
Exit
Validate user input and business rules.
Use console I/O and file I/O (for data persistence).
Display messages (Success / Fail) for each task.
SYSTEM INTERFACE
1. MAIN MENU
======================================
LIBRARY MANAGEMENT SYSTEM
======================================
1. Manage Books
2. Manage Members
3. Borrowing/Returning
4. Reports
5. Exit
--------------------------------------
Choose an option: _
BOOK MANAGEMENT
Task B1 — Add Book

----------- ADD BOOK -----------


Book ID: B001
Title: The Great Gatsby
Author: F. Scott Fitzgerald
Genre: Classic
Publication Year: 1925
Quantity: 5
[1] Save [2] Cancel

Output: Book added successfully.


Task B2 — Update Book

----------- UPDATE BOOK -----------


Enter Book ID: B001
Current Information:
Title: The Great Gatsby
Author: F. Scott Fitzgerald
Genre: Classic
Publication Year: 1925
Quantity: 5
Enter new Quantity (leave blank to skip): 7
[1] Update [2] Cancel

Output: Book updated successfully.


Task B3 — View All Books

----------- BOOK LIST -----------


ID Title Author Genre Year Qty
------------------------------------------------------------------
B001 The Great Gatsby F. Scott Fitzgerald Classic 1925 7
B002 1984 George Orwell Dystopian 1949 3
------------------------------------------------------------------
Press ENTER to return...
BORROWING/RETURNING
Task L1 — Borrow Book

----------- BORROW BOOK -----------


Member ID: M001
Book ID: B001
Borrow Date (DD/MM/YYYY): 28/04/2026
[1] Confirm [2] Cancel

Output: Book 'The Great Gatsby' borrowed by 'Member Name' successfully.


Task L2 — Return Book

----------- RETURN BOOK -----------


Member ID: M001
Book ID: B001
Return Date (DD/MM/YYYY): 05/05/2026
[1] Confirm [2] Cancel

Output: Book 'The Great Gatsby' returned by 'Member Name'. No overdue


fine.

Task L3 — Return Overdue Book

----------- RETURN BOOK -----------


Member ID: M002
Book ID: B003
Return Date (DD/MM/YYYY): 10/05/2026
[1] Confirm [2] Cancel

Output: Book 'Book Title' returned by 'Member Name'. Overdue fine: 25,000
VND.
REPORTS
Task R1 — Overdue Books

----------- OVERDUE BOOKS -----------


Book ID Title Member ID Member Name Due Date Days Overdue
----------------------------------------------------------------------------
B003 Book Title M002 Member Name 05/05/2026 5
----------------------------------------------------------------------------
Press ENTER to return...

Task R2 — Most Popular Books

----------- MOST POPULAR BOOKS -----------


Book ID Title Times Borrowed
------------------------------------------
B001 The Great Gatsby 15
B002 1984 12
------------------------------------------
Press ENTER to return...

You might also like