This is a very simple library management system implemented in Java with basic functionality for managing books and library members.
-
Book Management:
- Add new books to the library
- Remove books from the library
- Search books by title or author
- Display all books or only available books
-
Member Management:
- Add new library members
- Display all registered members
-
Borrow/Return Operations:
- Members can borrow available books
- Members can return borrowed books
- Track book availability status
Book.java- Represents a book with properties like ID, title, author, and availabilityMember.java- Represents a library member with borrowing capabilitiesLibrary.java- Main library class that manages books and membersLibraryManagementSystem.java- Main application with menu-driven interface
-
Compile all Java files:
javac *.java -
Run the application:
java LibraryManagementSystem
The system starts with sample data including 4 books and 3 members. You can:
- Add new books and members
- Borrow books (enter member ID and book ID)
- Return books (enter member ID and book ID)
- Search for books by title or author
- View all books, available books, or members
- Remove books from the library
The system comes pre-loaded with:
- Books: "The Great Gatsby", "To Kill a Mockingbird", "1984", "Pride and Prejudice"
- Members: John Doe, Jane Smith, Bob Johnson
- Run the program
- Choose option 7 to see all books
- Choose option 4 to borrow a book (use member ID 1 and book ID 1)
- Choose option 8 to see available books
- Choose option 5 to return the book
This is a basic implementation suitable for learning Java concepts like classes, objects, collections, and basic input/output operations.