Code Monkey home page Code Monkey logo

librarymanagement's Introduction

Library Management System

Database Format

Book.csv

[Id], [ISBN/ISSN], [Category], [Genre/Subject], [Title], [Author], [Publisher], [Publication Year], [Volume (for Journal only)], [Available count], [Total count]

Account.csv

[Id], [Username], [Password], [Name], [Date of Birth], [Gender], [User Type], [University], [SID], [Renewal Date], [Membership]

Reservation.csv

[Id], [Start Date], [Expired Date], [Content Id], [Borrower Id], [Is returned]

To-dos

  • DBAccess() constructor in DBAccess.cpp
  • signIn() method in LibMS.cpp
  • signUp() method in LibMS.cpp
  • Copy/Paste Database.h, Database.cpp
  • Fix addStudent() method in UserData.cpp. Add setId().
  • Fix readAllReservation(), readUserReservation() method in ReservationData.cpp
  • Fix createReservation() method in ReservationData.cpp, should update database.
  • Fix updateContent(), addContent() methods in ContentData.cpp
  • Fix deleteContent() method in ContentData.cpp, just need to compare ID only!
  • Copy/Paste addStudent() method in UserData.cpp
  • Copy/Paste updateStudent() method in UserData.cpp
  • Copy/Paste deleteStudent() method in UserData.cpp
  • Copy/Paste searchReadingByTitle(), searchReadingByAuthors() in ContentData.cpp

Notes:

  1. Content, Reading are abstract classes. If a method returns a Content/Reading pointer, that pointer should point to an instance of Book or Academic Journal.
  2. Use filter to refine the results!

Design

In general, we would like to design our system as real life activity. Followings are important classes/abstract classes and their role.

LibMS

Description: This class contains all needed information for the entire program to work, including current user, viewing reading, database. Thus, it is designed with Singleton pattern. There is only one instance of this class and it is constructed when the main program starts launching.

User

Description: This is an abstract class which contains information of a real life user. Each user would have an account which is store in a different class, Account. Student and Staff are two derived classes of this class.

Content

Description: This is an abstract class which contains information of a real life content which can be a book, a record, a media player. In this project, we just work with reading items which are books and academic journals.

Reservation

Description: This is an abstract class which contains information of a reservation, including content that is borrowed, borrower, start date and expired date.

Database

Description: This is a regular class that defines all CRUD operation on back-end database. This class's methods often require queries (String) which will be passed from derived classes (UserData, ContentData, ReservationData). Its child classes will do their particular tasks:

  • UserData: Add, modify, delete users' account. This class will associate with derived UserParser classes to complete the task.
  • ReservationData: Add, modify, delete reservations. It also uses ReservationFilter instance to refine the results of searching.
  • ContentData: Add, modify, delete content. This class will associate with derived ContentParser classes to complete the task. It also uses SearchingFilter instance to refine the results of searching.

ContentParser & UserParser

Description: These two class are abstract class. Its derived classes should implement to return specific queries to operate with database. For example, there are two derived classes (Book and Academic Journal) and their attribute are different from each other, so we need to add them into database with distinguished queries. When we call a method of ContentData class to add a book to the database, we should pass a BookParser instance to it. Then, BookParser should return a specific query.

librarymanagement's People

Contributors

trislee02 avatar huyquoctrinh avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.