Skip to content

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

22 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

README Structure

1. Project Overview
    This is a CLI(command Line interface) Library Management System application , runs on x86-64 bit windows system.
    it is now on only saves the data while running the application. (No databases yet)

2. Features
    we have Books , Student , in which we can Add Book , 
    remove Books by librarian (to be infuture updates) , (having some bugs RN) (NOT WORKING DUE TO POINTER DAGLING!!);

    display all books , display info of the book like available copy , issued copy , 

    Student can Issue , Return a Book .
    Can Add student , Display all Students , Display the info of Student , 
    like St_id ,Name , Department , Books Borrowed .


3. Folder Structure
            LibraryManagement/
        │
        ├── CMakeLists.txt            (later)
        ├── Makefile                  (later)
        ├── README.md
        ├── .gitignore
        │
        ├── include/
        │   ├── Book.h
        │   ├── Student.h
        │   ├── Library.h
        │   ├── Librarian.h
        │ 
        │
        ├── src/
        │   ├── main.cpp
        │   ├── Book.cpp
        │   ├── Student.cpp
        │   ├── Library.cpp
        │   ├── Librarian.cpp
        │ 
        │
        ├── data/
        │   ├── books.txt
        │   ├── students.txt
        │   └── library.dat
        │
        │
        ├── tests/
        │   ├── test_book.cpp
        │   ├── test_student.cpp
        │   └── test_library.cpp
        │
        ├── build/
        │   ├── *.o
        │   └── library.exe
        │
        └── assets/
            └── screenshots/

4. Class Diagram
    
                +------------------------------------------------+
                |                    Library                     |
                +------------------------------------------------+
                | - books : vector<Book>                         |
                | - students : vector<Student>                   |
                | - nextBookId : int                             |
                | - nextStudentId : int                          |
                +------------------------------------------------+
                | + addBook(...)                                 |
                | + removeBook(bookId)                           |
                | + searchById(bookId) : Book*                   |
                | + searchByName(title) : Book*                  |
                | + getBooks() : vector<Book>&                   |
                |                                                |
                | + addStudent(...) : Student*                   |
                | + searchStById(id) : Student*                  |
                | + getStudents() : vector<Student>&             |
                |                                                |
                | + issueBook(Student*, Book*)                   |
                | + returnBook(Student*, Book*)                  |
                | + studentInfo(Student*)                        |
                +------------------------------------------------+
                                        |                     |
                                        | contains            | contains
                                        |                     |
                                        v                     v

                +--------------------------------+      +----------------------------------+
                |             Book               |      |             Student             |
                +--------------------------------+      +----------------------------------+
                | - b_id : int                   |      | - st_id : int                    |
                | - title : string               |      | - name : string                  |
                | - author : string              |      | - department : string            |
                | - total_copy : int             |      | - borrowedBooks : vector<Book*>  |
                | - available_copy : int         |      +----------------------------------+
                | - issued_copy : int            |      | + borrowBook(Book*)              |
                +--------------------------------+      | + returnBook(Book*)              |
                | + issue()                      |      | + getBorrowedBooks()             |
                | + returnBook()                 |      | + display()                      |
                | + display()                    |      | + getters()                      |
                | + getters()                    |      +----------------------------------+
                +--------------------------------+


            RelationShip Diagram
                        +----------------+
                        |    Library     |
                        +----------------+
                        /           \
                        /             \
            contains  /               \ contains
                    /                 \
                    ▼                   ▼
                +---------+        +-----------+
                |  Book   |        | Student   |
                +---------+        +-----------+
                                        |
                                        |
                                borrows many
                                        |
                                        ▼
                                    +---------+
                                    |  Book   |
                                    +---------+

5. How to Build
    Fork the repo , and open it in terminal , compile the files using g++ compiler
    (inside the src).../src or just run this ->  g++ .\src\Book.cpp .\src\Library.cpp .\src\Student.cpp .\src\main.cpp -o ./build/library.exe
    
6. How to Run
    just run the library.exe  , in the Releases

    a student can borrow only one copy of a book!,(implemented)

7. Future Improvements
    should use map<b_id , *book> in library , or <b_id , book>( most next important thing)
    will implement new design data strucutre , using unordered_map , hashing  
    storing books as an object in borrowed books , 
    V2 update
    changing student id -> form idx to vector -> unordered_map ,  that will reduce the Searching time 
    resulting in O(log(n)) now , O(N) or someimes O(N^2);

    V3 update:
    will implement Login system , securly login
    for librarian , and students 

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages