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
3
.
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, availability=True):
self.title = title
self.author = author
self.isbn = isbn
self.availability = availability
def (self):
return f"'{self.title}' by {self.author}(ISBN: {self.isbn})"class User:
def (self, user_id, name):
self.user_id = user_id
self.name = name
self.borrowing_history =[] # To store all borrowed books (including returned)
self.current_books =[] # Books currently borrowed by the user
self.total_fines =0.0 # Track the user's total accumulated fines
def borrow_book(self, book):self.current_books.append(book)
def return_book(self, book):if book in self.current_books:
self.current_books.remove(book)
self.borrowing_history.append(book)
def add_fine(self, amount):self.total_fines += amount
def (self):
return f"User: {
self.name}, ID: {self.user_id}, Total Fines: ${self.total_fines:.2f}"class LibraryCheckout:
def (self):
self.borrrowed_books ={} # Stores books and their due dates
def borrow_book(self, user, book):
if book.availability:
due_date = datetime.now()+ timedelta(days=14) # 14-day loan period
self.borrowed_books[book]= due_date
book.availability = False
user.borrow_book(book)
print(f"Book {book} borrowed by {
user.name}. Due on {due_date.strftime('%Y-%m-%d')}")
else:
print(f"Book {book.title} is currently unavailable.")
def return_book(self, user, book, return_date=None):
if book in user.current_books:
due_date = self.borrowed_books.pop(book, None)
user.return_book(book)
book.availability = Trueif not return_date:
return_date = datetime.now()if return_date > due_date:fine = late_days *1 # $1 fine per day late
user.add_fine(fine)
print(f"Book {book} returned late by {
user.name}. Fine: ${fine:.2f}")
else:
print(f"Book {book} returned on time by {
user.name}.")
else:
print(f"{
user.name} did not borrow {book.title}.")
def print_receipt(self, user):
print(f"Receipt for {
user.name}
if user.current_books:
for book in user.current_books:
due_date = self.borrowed_books.get(book)
print(f"Book: {book.titl}, Due Date: {due_date.strftime('%Y-%m-%d')}")
else:
print("No books currently borrowed.")
print(f"Total Fines: ${user.total_fines:.2f}")if _name == "main":book1= Book("A Suitable Boy", "Vikram Seth", "111111111")
book2= Book("The God of Small Things", "Arundhati Roy", "222222222")
book3= Book("Train to Pakistan", "Khushwant Singh", "333333333")user1= User("101", "Mohit")library_checkout = LibraryCheckout()library_checkout.borrow_book(user1, book1)
library_checkout.borrow_book(user1, book2)
library_checkout.borrow_book(user1, book3)library_checkout.return_book(user1, book1)library_checkout.return_book(user1, book2)late_return_date = datetime.now()+ timedelta(days=17) # 3 days after the due date
library_checkout.return_book(user1, book3, return_date=late_return_date)library_checkout
Objective: The purpose of this assignment is to

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!