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 =