Question: Objective: The purpose of this assignment is to develop a graphical user interface ( GIJ ) for the Iibrary Management System ( LMS ) you
Objective:
The purpose of this assignment is to develop a graphical user interface
GIJ
for the Iibrary Management System
LMS
you developed in assessment
This system will streamline daily library operations and provide an
intuitive interface for staff to interact with the system.
Sample GUI:
Library Management System
Book Title:
Author:
ISBN:
User ID:
Name:
Register User
User ID:
Book ISBN:
Show Borrowed BooksTask Description:
You are required to build a graphical user interface
GUI
application to interact with the Book and Library Check
out classes from the previous tasks. The GUI should allow users to perform the following actions:
Book Management:
Input fields and buttons to add books.
User Management:
Input fields and buttons to register users.
Transaction Management:
Input fields and buttons for borrowing and returning books.
Messages:
Use message boxes to display success and warning messages.
Show books:
Opens a new window that displays the list of all books in the library.
Each book is shown with its title, author, ISBN, and availability status.
If no books are available, it displays
No books available."
Show users:
Opens a new window that displays the list of all registered users.
Each user is shown with their user ID
name and total fines.
If no users are registered, it displays
No users registered."
Show borrowed books:
This function opens a new window displaying the list of books currently borrowed along with the
names of the users who borrowed them. If no books are borrowed, it displays a message
indicating that no books are currently borrowed.
List of Borrowed Books
Borrowed Books:
Book: Python, Borrowed by: AliDeliverables:
GUI Application: A functional GUI application that meets the above requirements. Ensure that the
application is intuitive, with clear labels and buttons.
Code: The source code of the GUI application, including all relevant files.
Report: An accompanying report describing the design choices, any challenges faced, and how they were
addressed.
student submitted image, transcription available This report should be based on the previous LMS coding with arefrom datetime import datetime, timedeltaclass Book:
def self title, author, isbn, availabilityTrue:
self.title title
self.author author
self.isbn isbn
self.availability availability
def self:
return fselftitle by selfauthorISBN: selfisbnclass User:
def self userid name:
self.userid userid
self.name name
self.borrowinghistory # To store all borrowed books including returned
self.currentbooks # Books currently borrowed by the user
self.totalfines # Track the user's total accumulated fines
def borrowbookself book:self.currentbooks.appendbook
def returnbookself book:if book in self.currentbooks:
self.currentbooks.removebook
self.borrowinghistory.appendbook
def addfineself amount:self.totalfines amount
def self:
return fUser:
self.name ID: selfuserid Total Fines: $selftotalfines:fclass LibraryCheckout:
def self:
self.borrrowedbooks # Stores books and their due dates
def borrowbookself user, book:
if book.availability:
duedate datetime.now timedeltadays # day loan period
self.borrowedbooksbook duedate
book.availability False
user.borrowbookbook
printfBook book borrowed by
user.name Due on duedate.strftimeYmd
else:
printfBook booktitle is currently unavailable."
def returnbookself user, book, returndateNone:
if book in user.currentbooks:
duedate self.borrowedbooks.popbook None
user.returnbookbook
book.availability Trueif not returndate:
returndate datetime.nowif returndate duedate:fine latedays # $ fine per day late
user.addfinefine
printfBook book returned late by
user.name Fine: $fine:f
else:
printfBook book returned on time by
user.name
else:
printf
user.name did not borrow booktitle
def printreceiptself user:
printfReceipt for
user.name
if user.currentbooks:
for book in user.currentbooks:
duedate self.borrowedbooks.getbook
printfBook: booktitl Due Date: duedate.strftimeYmd
else:
printNo books currently borrowed."
printfTotal Fines: $usertotalfines:fif name "main":book BookA Suitable Boy", "Vikram Seth",
book BookThe God of Small Things", "Arundhati Roy",
book BookTrain to Pakistan", "Khushwant Singh", user User "Mohit"librarycheckout LibraryCheckoutlibrarycheckout.borrowbookuser book
librarycheckout.borrowbookuser book
librarycheckout.borrowbookuser booklibrarycheckout.returnbookuser booklibrarycheckout.returnbookuser booklatereturndate datetime.now timedeltadays # days after the due date
librarycheckout.returnbookuser book returndatelatereturndatelibrarycheckout
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
