The Library Management System is a console application written in C# for managing books and users in a library. The system supports two types of users: Librarians and regular users.
- Add new books to the library
- Remove books from the library
- Display available books list
- Borrow books
- Display available books list
Library Management System/
├── Program.cs # Main application entry point
├── Library.cs # Main library class
├── Book.cs # Book class
├── User.cs # Base user class
├── Librarian.cs # Librarian class
├── LibraryUser.cs # Regular user class
├── LibraryCard.cs # Library card class
└── Properties/
└── AssemblyInfo.cs # Assembly information
public class Book
{
public int Year; // Publication year
public string Title; // Book title
public string Author; // Author name
}AddBook(Book book)- Add a new bookRemoveBook(Book book)- Remove a bookDisplay()- Display books listBorrowBook(Book book)- Borrow a book
- User (Abstract): Base class for all users
- Librarian: Inherits from User, can add and remove books
- LibraryUser: Inherits from User, can borrow books
- .NET Framework 4.7.2 or later
- Visual Studio or any C# development environment
- Open the project in Visual Studio
- Press F5 or click "Start Debugging"
- Choose user type:
Lfor LibrarianRfor Regular user
Welcome to the Library System
Are you Librarian or regular user? (L / R)?
L
Welcome Librarian, Enter your Name -> John
Welcome John
Please choose to Add Book (A) / Remove Book (R) / Display Books (D)?
A
Enter Book Details Adding
=============================
Enter Title Book -> Introduction to Programming
Enter Author Book -> John Smith
Enter Year Book -> 2023
Book Add Successfully :)
Welcome to the Library System
Are you Librarian or regular user? (L / R)?
R
Welcome User, Enter your Name -> Sarah
Welcome Sarah
Please choose to Borrow Book(B) / Display Books (D)?
B
Enter Book Borrow Details
=============================
Enter Title Book -> Introduction to Programming
Enter Author Book -> John Smith
Enter Year Book -> 2023
Book Borrow Successfully :)
- Program.cs: Contains the main interface and core application logic
- Library.cs: Manages the book collection and operations (add, remove, borrow)
- Book.cs: Represents a book object with its basic properties
The system can be enhanced by adding:
- Database for data persistence
- Graphical User Interface (GUI)
- Secure login system
- Due date tracking for borrowed books
- Notification system for overdue books
- Detailed reports on library activity
This is an educational project that can be used as a foundation for developing a more advanced library management system.
This project is open source and available for educational and development use.