Design a Library Management System

该图书馆管理系统主要涉及三个参与者:图书管理员、会员和系统。图书管理员负责添加、修改书籍和用户,会员可以搜索目录、借阅、预订和归还书籍。系统负责发送关于逾期书籍和取消预订的通知。主要用例包括添加/删除/编辑书籍、搜索目录、注册/取消会员、借阅、预订、续借和归还。系统的主要类包括图书馆、书籍、图书项、账户、借书卡、预订、借阅、目录、罚款、作者和书架。
摘要由CSDN通过智能技术生成

Use case diagram

We have three main actors in our system:

  • Librarian: Mainly responsible for adding and modifying books, book
    items, and users. The Librarian can also issue, reserve, and return
    book items.
  • Member: All members can search the catalog, as well as check-out,
    reserve, renew, and return a book.
  • System: Mainly responsible for sending notifications for overdue
    books, canceled reservations, etc.

Here are the top use cases of the Library Management System:

  • Add/Remove/Edit book: To add, remove or modify a book or book item.

  • Search catalog: To search books by title, author, subject or
    publication date.

  • Register new account/cancel membership: To add a new member or
    cancel the membership of an existing member.

  • Check-out book: To borrow a book from the library.

  • Reserve book: To reserve a book which is not currently available.

  • Renew a book: To reborrow an already checked-out book.

  • Return a book: To return a book to the library which was issued to a member.
    在这里插入图片描述

Use case diagram

Class diagram

Here are the main classes of our Library Management System:

Library: The central part of the organization for which this software has been designed. It has attributes like ‘Name’ to distinguish it from any other libraries and ‘Address’ to describe its location.

Book: The basic building block of the system. Every book will have ISBN, Title, Subject, Publishers, etc.

BookItem: Any book can have multiple copies, each copy will be considered a book item in our system. Each book item will have a unique barcode.

Account: We will have two types of accounts in the system, one will be a general member, and the other will be a librarian.

LibraryCard: Each library user will be issued a library card, which will be used to identify users while issuing or returning books.

BookReservation: Responsible for managing reservations against book items.

BookLending: Manage the checking-out of book items.

Catalog: Catalogs contain list of books sorted on certain criteria. Our system will support searching through four catalogs: Title, Author, Subject, and Publish-date.

Fine: This class will be responsible for calculating and collecting fines from library members.

Author: This class will encapsulate a book author.

Rack: Books will be placed on racks. Each rack will be identified by a rack number and will have a location identifier to describe the physical location of the rack in the library.

Notification: This class will take care of sending notifications to library members.

Class diagram for Library Management System
在这里插入图片描述
Enums and Constants: Here are the required enums, data types, and constants:

class BookFormat(Enum):
  HARDCOVER, PAPERBACK, AUDIO_BOOK, EBOOK, NEWSPAPER, MAGAZINE, JOURNAL = 1, 2, 3, 4, 5, 6, 7


class BookStatus(Enum):
  AVAILABLE, RESERVED, LOANED, LOST = 1, 2, 3, 4


class ReservationStatus(Enum):
  WAITING, PENDING, CANCELED, NONE = 1, 2, 3, 4


class AccountStatus(Enum):
  ACTIVE, CLOSED, CANCELED, BLACKLISTED, NONE = 1, 2, 3, 4, 5


class Address:
  def __init__(self, street, city, state, zip_code, country):
    self.__street_address = street
    self.__city = city
    self.__state = state
    self.__zip_code = zip_code
    self.__country = country


class Person(ABC):
  def __init__(self, name, address, email, phone):
    self.__name = name
    self.__address =
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
机器学习模型机器学习模型机器学习模型机器学习模型机器学习模型机器学习模型机器学习模型机器学习模型机器学习模型机器学习模型机器学习模型机器学习模型机器学习模型机器学习模型机器学习模型机器学习模型机器学习模型机器学习模型机器学习模型机器学习模型机器学习模型机器学习模型机器学习模型机器学习模型机器学习模型机器学习模型机器学习模型机器学习模型机器学习模型机器学习模型机器学习模型机器学习模型机器学习模型机器学习模型机器学习模型机器学习模型机器学习模型机器学习模型机器学习模型机器学习模型机器学习模型机器学习模型机器学习模型机器学习模型机器学习模型机器学习模型机器学习模型机器学习模型机器学习模型机器学习模型机器学习模型机器学习模型机器学习模型机器学习模型机器学习模型机器学习模型机器学习模型机器学习模型机器学习模型机器学习模型机器学习模型机器学习模型机器学习模型机器学习模型机器学习模型机器学习模型机器学习模型机器学习模型机器学习模型机器学习模型机器学习模型机器学习模型机器学习模型机器学习模型机器学习模型机器学习模型机器学习模型机器学习模型机器学习模型机器学习模型机器学习模型机器学习模型机器学习模型机器
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值