Skip to content

A console-based Library Management System written in C++. Features include book search, borrowing/returning management, and file-based data persistence.

Notifications You must be signed in to change notification settings

Ryan-z-Feng-ccsf/LibrarySystem

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Library Management System (C++)

πŸŽ“ Course Project: Computer Programming (Dec 2023) πŸ“… Date: December 2023

A robust, console-based Library Management System developed in C++. This application handles book inventory, reader management, and borrowing records using file-based persistence.

πŸ‘¨β€πŸ’» Project Background & Contribution

This project was developed as a group assignment for the Computer Programming course.

My Key Contributions:

  • Search Engine (Find Module): Designed and implemented the core search logic, allowing users to find books by Title, Author, Publisher, or ISBN with fuzzy matching support.
  • Admin Management (Admin Module): Developed the full CRUD (Create, Read, Update, Delete) functionality for the book inventory, enabling administrators to manage the library database efficiently.

πŸš€ Features

  • Smart Search: Find books by Title, Author, Publisher, or ISBN (supports spaces in keywords).
  • Inventory Control: Real-time updates of book stock when books are borrowed or returned.
  • Role Management: Distinct functionalities for Admins (Book Management) and Readers (Borrowing/Returning).
  • Data Persistence: Uses text files (.txt) to permanently store data, ensuring records are saved between sessions.

πŸ› οΈ Tech Stack

  • Language: C++ (Standard 11/14/17)
  • Build System: CMake
  • IDE: CLion
  • Data Handling: File I/O with Tab-Separated Values (TSV) to handle complex string inputs.

πŸ”§ How to Run

  1. Clone the repository:
    git clone [https://github.com/YOUR_USERNAME/LibrarySystem.git](https://github.com/YOUR_USERNAME/LibrarySystem.git)
  2. Open in CLion (or compile via CMake).
  3. Build & Run.
    • Note: Ensure the data/ folder is in the working directory so the program can load the databases.

πŸ“ Usage Guide

  1. For Admins: Log in to access the Book Management Menu. You can add new books, update existing stock/info, or delete obsolete records.
  2. For Readers: Use the Search function to find books and proceed to Borrow or Return using the Book ID.

πŸ“‚ Project Structure

The project follows a modular C++ structure separating logic, headers, and data.

β”œβ”€β”€ data/
β”‚   β”œβ”€β”€ books.txt              # Main book database
β”‚   β”œβ”€β”€ borrowing_history.txt  # Logs of all transactions
β”‚   β”œβ”€β”€ content.txt            # Detailed descriptions of books
β”‚   └── readers.txt            # Registered reader accounts
β”œβ”€β”€ include/                   # Header files (.h)
β”‚   β”œβ”€β”€ Admin.h
β”‚   β”œβ”€β”€ Book.h
β”‚   β”œβ”€β”€ BorrowReturn.h
β”‚   β”œβ”€β”€ Find.h
β”‚   β”œβ”€β”€ Ranking.h
β”‚   β”œβ”€β”€ Reader.h
β”‚   └── User.h
β”œβ”€β”€ src/                       # Source files (.cpp)
β”‚   β”œβ”€β”€ Admin.cpp              # Admin logic (Add/Delete/Update books)
β”‚   β”œβ”€β”€ Book.cpp
β”‚   β”œβ”€β”€ BorrowReturn.cpp
β”‚   β”œβ”€β”€ Find.cpp               # Search implementation
β”‚   β”œβ”€β”€ Ranking.cpp
β”‚   └── Reader.cpp
β”œβ”€β”€ CMakeLists.txt
└── main.cpp                   # Entry point

About

A console-based Library Management System written in C++. Features include book search, borrowing/returning management, and file-based data persistence.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •