Academic C++ Project

Smart Library Management System

Console app for managing books, members, borrow records, returns, late fines, and reservations — all through a menu-driven interface built in C++.

C++ Structures Arrays Functions Menu System
Add books and library members
📖Borrow and return books
💰Calculate late return fines
📝Reserve currently borrowed books
🔎Display available books
📊Show borrow and reservation records
Add data
Borrow book
Update availability
Return book
Check days late
Calculate fine
FIXED No bounds check on arrays — adding more books/members than the fixed array size causes undefined behaviour. Added a check before any bookCount++ or memberCount++.
FIXED Borrow doesn't check availability — the original could mark the same book as borrowed twice. Added an isAvailable guard before creating a borrow record.
FIXED Return doesn't clear the borrow record — returning a book updated isAvailable but left a dangling borrow record with no return date. The record is now marked resolved on return.
KNOWN IDs assigned by array index — if you delete a member mid-array, IDs shift. Would need a proper ID counter to fix properly, out of scope for this assignment.
library_structures.cpp
struct Book {
    int    bookId;
    string title;
    string author;
    bool   isAvailable;
};

struct Member {
    int    memberId;
    string name;
    string phone;
};

struct BorrowRecord {
    int    recordId;
    int    bookId;
    int    memberId;
    int    daysBorrowed;
    double fine;
    bool   isReturned;   // BUG FIX: track whether returned
};

struct Reservation {
    int reservationId;
    int bookId;
    int memberId;
};
← Back to Portfolio