0% found this document useful (0 votes)
12 views70 pages

Bookstore Management - Project Report 2024-25

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views70 pages

Bookstore Management - Project Report 2024-25

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 70

||Jai Sri Gurudev||

Sri Adichunchanagiri Shikshana Trust ®

BGS NATIONAL PUBLIC SCHOOL


(Affiliated to Central Board of Secondary Education, New Delhi)
Hulimavu, Bannerghatta Road, Bengaluru - 560 076

Computer Science Investigatory Project


Year:2024-25
Topic: Book Store Management
Computer Science Investigatory Project 2024-25

Name: Adithyan MP
Class: 12 D
C
ERTIFICATE
Exam roll no:

This is to certify that Adithyan MP of class XII D of BGS


National Public School has successfully completed the
Investigatory Project in Computer Science for SENIOR
SECONDARY CERTIFICATE EXAMINATION (SSCE)
prescribed by CBSE in the year 2024-2025.

Date:

Principal Sign

External Examiner Internal Examiner


1|P a g e BGS National Public School
Computer Science Investigatory Project 2024-25

ACKNOWLEDGEMENTS

I would like to express my gratitude to our Respected Principal


Dr Malini M Dutta, and Vice Principal Ms Savitha Suverna
for being a constant pillar of support.
I would then like to thank our Computer Science teacher,
Ms. Babitha E Z for helping me with this project and guiding
me throughout and helping me in every step of the project.

I would also like to thank God Almighty and my parents for


always being by my side and my fellow mates who were always
ready to help.

2|P a g e BGS National Public School


Computer Science Investigatory Project 2024-25

TABLE OF CONTENTS

S.NO TITLE PAGE


NO
1 INTRODUCTION 4

2 PROJECT SELECTION 5

3 WORKING ENVIRONMENT 6

4 LIBRARIES & MODULES 7

5 DATA DICTIONARY 8-9

6 SOURCE CODE 10-62

7 LOG OF PROJECT 56-59

8 SAMPLE OUTPUT 60-66

9 BIBLIOGRAPHY 67

3|P a g e BGS National Public School


Computer Science Investigatory Project 2024-25

INTRODUCTION
This project focuses on the development of an eBook store that
allows users to browse and purchase digital books. Our platform
offers a convenient shopping experience where users can
explore a diverse selection of ebooks, select their favorites, and
easily add them to their shopping cart for purchase.
Key features of the project include a user-friendly interface that
enables users to view detailed information about each book,
author details, and customer ratings. Users can create personal
accounts with secure password protection, facilitating easy
management of their purchases. The shopping cart functionality
allows users to review their selected books before proceeding to
checkout, ensuring a smooth and efficient buying process.
Administrative controls are in place for managing the book
catalog, updating, and removal of titles to maintain an up-to-date
inventory.
Inspired by successful online marketplaces, our goal is to create
a comprehensive ebookstore that meets the needs of readers
looking to purchase digital literature quickly and easily.

4|P a g e BGS National Public School


Computer Science Investigatory Project 2024-25

PROJECT SELECTION
We adopted this idea to provide an interactive interface
between users and books. The application program
provides a quality experience to the user using data files.
Concepts in Python and MySQL were used to develop the
application.

The admin creates a database consisting of 3 tables:


personaldata, adminpage and book_details.
Users can view and purchase books of their choice using
a simple and efficient interface. All this has been
achieved through efficient extraction from and injection
into the database.

5|P a g e BGS National Public School


Computer Science Investigatory Project 2024-25

WORKING ENVIRONMENT
OPTIMUM REQUIREMENTS

 Operating System – Windows 10/11

 Processor – Must be clocked over 1.5 GHz

 Graphics Driver – Intel Integrated Graphics or


equivalent or greater

 RAM – 4 GB or more.

 Hard Disk – 1 TB

 Python interpreter – Python IDLE 3.6

 MySQL

6|P a g e BGS National Public School


Computer Science Investigatory Project 2024-25

LIBRARIES & MODULES.


Libraries Purpose
tkinter Gui and visual presentation of the app
mysql.connector Python SQL connectivity
PIL Images in Tkinter
OS Remove and rename csv,binary file
Csv Module for reading from and writing to CSV
(Comma-Separated Values) files.
pickle Module for serializing and deserializing Python
objects to save and load complex data structures.

DATA DICTIONARY
7|P a g e BGS National Public School
Computer Science Investigatory Project 2024-25

USER DEFINED FUNCTIONS

Functions PURPOSE

Welcome.py
admin(self) function to open admin login page

customer(self) function to open customer login page

Registration.py
register(self) Import customer registration page
submit() This code handles a registration form
submission, validating user input and
storing it in a MySQL database upon
successful validation.
Login.py
login(self) Imports login window with details to login
into your account
toggle_password() Toggles password visibility in a GUI,
switching between showing asterisks (*)
and plain text
forgot_password() Imports forgot password window, used to
reset password
Store.py
back_window() Imports the previous window (either main
window or admin hub)
search_books(self) function for searching books

cart_window(self) function to open cart window


<bookname>.py
back_window() Imports the main window
add_to_cart() Adds books to cart window

Admin.py
8|P a g e BGS National Public School
Computer Science Investigatory Project 2024-25

logout(self) Logout of admin window

update_rating Function to update the rating of a selected


book

display_feedback_window(self) function to display feedback of the


customers

customerdata(self) function to go to customer data window

Feedback.py
save_feedback() Function to save customer feedback to a
text file

Main.py
booksdata(self) function to go to books data window

view_books(self) function to view books

logout(self) Logout of customer window


checkout(self) Logs out of cart window and imports the
feedback window
delete_books() Function to delete book from the cart
window using book id

SOURCE CODE
welcome.py
9|P a g e BGS National Public School
Computer Science Investigatory Project 2024-25

#welcome window
import csv
import tkinter as tk
from tkinter import filedialog as fd
from PIL import Image, ImageTk

def __init__(self, csv_file): # Initialize instance variables to


store book titles and images
self.book_titles = [] # stores book titles
with open(csv_file, 'r') as f:
reader = csv.reader(f)
for row in reader:
self.book_titles.append(row[0])

class MainWindow:
global master
def __init__(self, master):
self.master = master # Store the master window
# Initialize instance variables to store book titles and images
master.title("welcome page")
master.geometry("800x600")
master.configure(bg='#690924')

# Load the logo image


logo_image = Image.open("catbooks.png")
logo_image = ImageTk.PhotoImage(logo_image)

# Create a label to display the logo and welcome text


welcome_frame = tk.Frame(master, bg='#690924')
welcome_frame.pack(pady=20)

welcome_label = tk.Label(welcome_frame, image=logo_image,


font=("Book Antiqua", 24), bg='#690924', compound="bottom")
welcome_label.image = logo_image
welcome_label.pack(pady=10)

welcome_text = tk.Label(welcome_frame, text="Welcome to


Bookstore!", font=("Book Antiqua", 24), fg="#debcb2", bg='#690924')
welcome_text.pack(pady=10)

# Create a frame for the buttons


button_frame = tk.Frame(master, bg='#690924')
button_frame.pack(pady=20)

10 | P a g e BGS National Public School


Computer Science Investigatory Project 2024-25

#admin button
self.admin_button = tk.Button(button_frame, text="Admin",
command=self.admin, font=("Book Antiqua", 18),fg='#690924',bg="#debcb2")
self.admin_button.pack(side=tk.LEFT, padx=10)

#customer button
self.customer_button = tk.Button(button_frame, text="Customer",
command=self.customer, font=("Book Antiqua",
18),fg='#690924',bg="#debcb2")
self.customer_button.pack(side=tk.LEFT, padx=10)

def admin(self): #function to open admin login page


self.master.destroy()
import adminlogin

def customer(self): #function to open customer login page


self.master.destroy()
import customer

root = tk.Tk()
my_gui = MainWindow(root) #create main window
root.mainloop()

store.py

#store window
import json
import csv

11 | P a g e BGS National Public School


Computer Science Investigatory Project 2024-25

from tkinter import *


import tkinter as tk
from tkinter import filedialog as fd
from PIL import Image, ImageTk
import os

class MainWindow:
def __init__(self, master):
self.master = master
master.title("store")
master.geometry("1100x700")
master.configure(bg='#690924')

# Load the logo image


logo_image = Image.open("catbooks.png")
logo_image = ImageTk.PhotoImage(logo_image)

# Create a label to display the logo and welcome text


welcome_frame = Frame(master, bg='#690924')
welcome_frame.pack(pady=20)

welcome_label = tk.Label(welcome_frame, image=logo_image,


font=("Book Antiqua", 24), bg='#690924', compound="bottom")
welcome_label.image = logo_image
welcome_label.pack(pady=10)

welcome_text = tk.Label(welcome_frame, text="Welcome to


Bookstore!", font=("Book Antiqua", 24),fg='#debcb2', bg='#690924')
welcome_text.pack(pady=10)

# Create a frame for the search bar and list box


search_frame = Frame(master, bg='#690924')
search_frame.pack(pady=20)

self.search_label = tk.Label(search_frame, text="Search:",


font=("Book Antiqua", 18),fg='#debcb2', bg='#690924')
self.search_label.pack(side=LEFT, padx=10)

self.search_entry = tk.Entry(search_frame, width=50, font=("Book


Antiqua", 18), fg='#65041d',bg='#debcb2')
self.search_entry.pack(side=LEFT, padx=10)

self.search_button = tk.Button(search_frame, text="Search",


command=self.search_books, fg='#65041d',font=("Book Antiqua",
18),bg='#debcb2')
self.search_button.pack(side=LEFT, padx=10)

12 | P a g e BGS National Public School


Computer Science Investigatory Project 2024-25

#back button
self.back_button = tk.Button(search_frame, text="Back",
command=self.back_window, fg='#65041d',font=("Book Antiqua",
18),bg="#debcb2")
self.back_button.pack(side=LEFT, padx=10)

#cart button
self.cart_button = tk.Button(search_frame, text="Cart",
command=self.cart_window, fg='#65041d',font=("Book Antiqua",
18),bg="#debcb2")
self.cart_button.pack(side=LEFT, padx=10)

# Create a frame for the list box


list_frame = Frame(master, bg='#690924')
list_frame.pack(pady=20)

self.book_list_box = tk.Listbox(list_frame, width=100, height=30,


fg='#65041d',bg='#debcb2', font=("Book Antiqua", 18))
self.book_list_box.pack(padx=10, pady=10)

# Load the list of books from the CSV file


self.book_titles = []
self.book_author = []
with open('Book.csv','r') as f:
reader = csv.reader(f)
for row in reader:
self.book_titles.append(row[0])
for title in self.book_titles:
self.book_list_box.insert(END,title)

self.book_list_box.bind("<<ListboxSelect>>",
self.open_book_window)

def back_window(self): #function for back button


self.master.destroy()
import main

def search_books(self): #function for search


self.book_list_box.delete(0, END)
search_term = self.search_entry.get().lower()
for title in self.book_titles:
if search_term in title.lower():
self.book_list_box.insert(END, title)

def cart_window(self): #function for cart

13 | P a g e BGS National Public School


Computer Science Investigatory Project 2024-25

self.master.destroy()
import cart

def open_book_window(self, event): #function for opening book


details
selected_index = self.book_list_box.curselection()[0]
selected_title = self.book_list_box.get(selected_index) #get the
selected book title
programs = {
"2 states chetan bhagat":
"2States.py",
"11/22/63 stephen king":
"112263.py",
"a bend in the road nicholas sparks":
"ABendInTheRoad.py",
"a book of simple living ruskin bond":
"ABookofSimpleLiving.py" ,
"a flight of pigeons ruskin bond":
"AFlightofPigeons.py" ,
"a stranger in the Mirror sidney sheldon":
"AstrangerintheMirror.py" ,
"a tale of two cities charles dickens":
"ATaleofTwoCities.py" ,
"a walk to remember nicholas sparks":
"AWalktoRemember.py" ,
"all your perfects colleen hoover":
"AllYourPerfects.py" ,
"an abundance of katherines john green":
"AnAbundanceofKatherines.py" }

# Run the program corresponding to the selected book title


if selected_title in programs:
root.destroy()
os.system(f"python {programs[selected_title]}")
else:
print(f"No program found for book title '{selected_title}'")

root = tk.Tk()
my_gui = MainWindow(root)
root.mainloop()

registration.py

14 | P a g e BGS National Public School


Computer Science Investigatory Project 2024-25

#customer registration winodw


from tkinter import *
from tkinter import messagebox
import mysql.connector

windows = Tk()
windows.geometry('500x500+200+10')
windows.resizable(False,False)
windows.title('CUSTOMER REGISTRATION')

#show and hide password


def show(): #to show and hide password
passwordEntry.configure(show='#')
check1.configure(command=hide)

def hide(): #to show and hide password


passwordEntry.configure(show='')
check1.configure(command=show)

def show1(): #to show and hide password


renterpasswordEntry.configure(show='#')
check2.configure(command=hide1)

def hide1(): #to show and hide password


renterpasswordEntry.configure(show='')
check2.configure(command=show1)

def back(): #to go back to login page


windows.destroy()
import loginpg

# Field Validations
def submit():
if nameEntry.get()=='' or phone_noEntry.get()=='' or
emailentry.get()=='' \
or usernameEntry.get()=='' or passwordEntry.get()=='' or
renterpasswordEntry.get()=='': #if any field is empty it'll show an error
box
messagebox.showerror('Alert!', 'All Fields must be entered')

elif passwordEntry.get() != renterpasswordEntry.get(): #if the


password entered doesn't match it'll show an error box
messagebox.showerror('Alert!', 'Passwords didn\'t Match')

15 | P a g e BGS National Public School


Computer Science Investigatory Project 2024-25

else:
#successfully registered
db=mysql.connector.connect(host='localhost', user='root',
password='password',charset='utf8') #connecting to customer database
cur=db.cursor()
cur.execute('CREATE DATABASE IF NOT EXISTS p_registration')
cur.execute('USE p_registration')

cur.execute('''CREATE TABLE IF NOT EXISTS personaldata (


id INT AUTO_INCREMENT PRIMARY KEY NOT NULL,
name VARCHAR(40),
phone_no INT,
email VARCHAR(40),
username VARCHAR(40),
passwrd VARCHAR(10),
confirmpasswrd VARCHAR(10))''')

query='insert into personaldata(name, phone_no, email, username,


passwrd, confirmpasswrd)' \
' values(%s,%s,%s,%s,%s,%s)'
cur.execute(query,(nameEntry.get(), phone_noEntry.get(),
emailentry.get(),usernameEntry.get(),
passwordEntry.get(),
renterpasswordEntry.get()))
db.commit() #to execute the change
db.close()
messagebox.showinfo('Success', 'Successful Registration.')

#to clear the fields after a successful registration


nameEntry.delete(0, END)
phone_noEntry.delete(0, END)
emailentry.delete(0, END)
usernameEntry.delete(0, END)
passwordEntry.delete(0, END)
renterpasswordEntry.delete(0, END)

windows.destroy()
import loginpg

#section for getting data from the entry fields


name = StringVar()
phone_no = IntVar()
email = StringVar()
username = StringVar()
passwrd = StringVar()
confirmpasswrd = StringVar()

16 | P a g e BGS National Public School


Computer Science Investigatory Project 2024-25

# frame=Frame(windows)
frame=Frame(windows, width=610, height=640, bg='#65041d', bd=8)
frame.place(x=0,y=0)

#labels on window
heading =Label(frame, text='~SIGN UP PAGE~', fg='#debcb2',bg='#65041d',
font=('Garamond', 20, 'bold'))
heading.place(x=120, y=3)
#name label
nameLabel= Label(frame, text="Name:", fg='#debcb2', bg='#65041d',
font=('Book Antiqua', 15, 'bold'))
nameLabel.place(x=10, y=70)
nameEntry=Entry(frame, width=30, borderwidth=2)
nameEntry.place(x=240, y=70)
#phone number label
phone_noLabel= Label(frame, text="Phone number:",
fg='#debcb2',bg='#65041d', font=('Book Antiqua', 15, 'bold'))
phone_noLabel.place(x=10, y=110)
phone_noEntry=Entry(frame, width=30, borderwidth=2)
phone_noEntry.place(x=240, y=110)
#email label
idlabelEmail=Label(frame, text='Email:', fg='#debcb2', bg='#65041d',
font=('Book Antiqua', 15, 'bold'))
idlabelEmail.place(x=10, y=150)
emailentry=Entry(frame, width=30, borderwidth=2)
emailentry.place(x=240, y=150)
#username label
usernamelbl = Label(frame, text='Username:', fg='#debcb2', bg='#65041d',
font=('Book Antiqua', 15, 'bold'))
usernamelbl.place(x=10, y=190)
usernameEntry=Entry(frame, width=30, borderwidth=2)
usernameEntry.place(x=240, y=190)
#password label
passwordlbl = Label(frame, text='Password:', fg='#debcb2', bg='#65041d',
font=('Book Antiqua', 15, 'bold'))
passwordlbl.place(x=10, y=230)
passwordEntry=Entry(frame, width=30, borderwidth=2)
passwordEntry.place(x=240, y=230)
#confirm password label
renterpasswordlbl = Label(frame, text='Confirm Password:', fg='#debcb2',
bg='#65041d', font=('Book Antiqua', 15, 'bold'))
renterpasswordlbl.place(x=10, y=270)
renterpasswordEntry=Entry(frame, width=30, borderwidth=2)
renterpasswordEntry.place(x=240, y=270)
#back button

17 | P a g e BGS National Public School


Computer Science Investigatory Project 2024-25

bckbtn = Button(frame, text='<<',


width=7,borderwidth=5,height=2,bg='#debcb2',fg='#65041d',cursor='hand2',b
order=2,command=back)
bckbtn.place(x=10, y=350)
#submit button
submit1btn =
Button(frame,text='Submit',width=15,borderwidth=5,height=2,bg='#debcb2',f
g='#65041d',cursor='hand2',border=2,
font=('Book Antiqua', 16, 'bold'), command=submit)
submit1btn.place(x=150, y=350)
#to show and hide password
check1 = Checkbutton(frame, text='',command=show, bg='#65041d')
check1.place(x=420, y=230)
check2 = Checkbutton(frame, text='',command=show1, bg='#65041d')
check2.place(x=420, y=270)

windows.mainloop()

main.py

#main window
import csv
import tkinter as tk
from tkinter import filedialog as fd
from PIL import Image, ImageTk
import os

class BookstoreData:
def __init__(self, csv_file):
self.book_titles = [] #stores book titles
with open(csv_file, 'r') as f:
reader = csv.reader(f)
for row in reader:
self.book_titles.append(row[0])

class MainWindow:
global master
def __init__(self, master, data):
self.master = master
self.data = data
master.title("Main Window")
master.geometry("800x600")
master.configure(bg='#690924') # Change background color to
light gray

18 | P a g e BGS National Public School


Computer Science Investigatory Project 2024-25

# Load the logo image


logo_image = Image.open("catbooks.png")
logo_image = ImageTk.PhotoImage(logo_image)

# Create a label to display the logo and welcome text


welcome_frame = tk.Frame(master, bg='#690924')
welcome_frame.pack(pady=20)

welcome_label = tk.Label(welcome_frame, image=logo_image,


font=("Book Antiqua", 24), bg='#690924', compound="bottom")
welcome_label.image = logo_image
welcome_label.pack(pady=10)
welcome_text = tk.Label(welcome_frame, text="Welcome to
Bookstore!", font=("Book Antiqua", 24), fg="#debcb2", bg='#690924')
welcome_text.pack(pady=10)

# Create a frame for the buttons


button_frame = tk.Frame(master, bg='#690924')
button_frame.pack(pady=20)
#view books button
self.view_books_button = tk.Button(button_frame, text="View
Books", command=self.view_books, font=("Book Antiqua",
18),fg='#690924',bg="#debcb2")
self.view_books_button.pack(side=tk.LEFT, padx=10)
#view cart button
self.view_cart_button = tk.Button(button_frame, text="View Cart",
command=self.view_cart, font=("Book Antiqua",
18),fg='#690924',bg="#debcb2")
self.view_cart_button.pack(side=tk.LEFT, padx=10)
#logout button
self.logout_button = tk.Button(button_frame, text="Logout",
command=self.logout, font=("Book Antiqua", 18),fg='#690924',bg="#debcb2")
self.logout_button.pack(side=tk.LEFT, padx=10)

def view_books(self): #function to view books


self.master.destroy()
import store

def view_cart(self): #function to view cart


self.master.destroy()
import cart

def logout(self): #function to logout


self.master.destroy()
os.remove('books.bin')

19 | P a g e BGS National Public School


Computer Science Investigatory Project 2024-25

root = tk.Tk()
data = BookstoreData('Book.csv')
my_gui = MainWindow(root, data)

root.mainloop()

loginpg.py

from tkinter import *


from tkinter import messagebox
from PIL import Image, ImageTk
import mysql.connector

# Set up main window with original color scheme


window = Tk()
window.title("Login Page")
window.geometry("500x350")
window.configure(bg='#65041d')

# Configure fonts and colors for consistency with the original file
HEADER_FONT = ("Garamond", 24, "bold")
LABEL_FONT = ("Book Antiqua", 14)
BUTTON_FONT = ("Book Antiqua", 10, "bold")
TEXT_COLOR = '#debcb2'
BACKGROUND_COLOR = '#65041d'
BUTTON_COLOR = '#debcb2'
BUTTON_TEXT_COLOR = '#65041d'

# Forgot Password
def forgot_password():
window.destroy()
import forgotpassword

# Create Account
def create_one():
window.destroy()
import registration

# Login Function
def login():
if idEntry.get() == "" or passwdEntry.get() == "":
messagebox.showerror("Alert", "Please enter all fields!")
else:

20 | P a g e BGS National Public School


Computer Science Investigatory Project 2024-25

# Database connection
db = mysql.connector.connect(
host="localhost",
user="root",
password="password",
database="p_registration",
charset="utf8"
)
cur = db.cursor()
query = "SELECT * FROM personaldata WHERE passwrd=%s"
cur.execute(query, (passwdEntry.get(),))
roles = cur.fetchone()

if roles is None:
messagebox.showerror("Alert", "Incorrect email or password")
else:
messagebox.showinfo("Success", "Login successful!")
idEntry.delete(0, END)
passwdEntry.delete(0, END)
window.destroy()
import main

# Show/hide password
def toggle_password():
if passwdEntry.cget("show") == "":
passwdEntry.config(show="*")
toggle_button.config(text="Show")
else:
passwdEntry.config(show="")
toggle_button.config(text="Hide")

# Header
heading = Label(window, text="~ SIGN IN PAGE ~", font=HEADER_FONT,
fg=TEXT_COLOR, bg=BACKGROUND_COLOR)
heading.pack(pady=20)

# Frame for the input fields


frame = Frame(window, bg=BACKGROUND_COLOR, padx=20, pady=20)
frame.pack()

# Email
id_label = Label(frame, text="Email:", font=LABEL_FONT, fg=TEXT_COLOR,
bg=BACKGROUND_COLOR)
id_label.grid(row=0, column=0, sticky=W, pady=10)
idEntry = Entry(frame, font=LABEL_FONT, width=30)
idEntry.grid(row=0, column=1, padx=10)

21 | P a g e BGS National Public School


Computer Science Investigatory Project 2024-25

# Password
passwd_label = Label(frame, text="Password:", font=LABEL_FONT,
fg=TEXT_COLOR, bg=BACKGROUND_COLOR)
passwd_label.grid(row=1, column=0, sticky=W, pady=10)
passwdEntry = Entry(frame, font=LABEL_FONT, show="*", width=30)
passwdEntry.grid(row=1, column=1, padx=10)

# Toggle show/hide password


toggle_button = Button(frame, text="Show", font=("Arial", 10),
command=toggle_password, fg=TEXT_COLOR, bg=BACKGROUND_COLOR, border=0)
toggle_button.grid(row=1, column=2, padx=5)

# Login Button
login_button = Button(window, text="LOGIN", font=BUTTON_FONT, width=20,
bg=BUTTON_COLOR, fg=BUTTON_TEXT_COLOR, command=login)
login_button.pack(pady=20)

# Forgot Password and Create Account Buttons


forgot_button = Button(window, text="Forgot Password?", font=("Arial",
10), fg=TEXT_COLOR, bg=BACKGROUND_COLOR, border=0,
command=forgot_password)
forgot_button.pack()

create_button = Button(window, text="Create One", font=("Arial", 10),


fg=TEXT_COLOR, bg=BACKGROUND_COLOR, border=0, command=create_one)
create_button.pack(pady=5)

window.mainloop()

forgotpassword.py

#forgot password window


from tkinter import *
from PIL import Image, ImageTk
import tkinter as tk
from tkinter import messagebox
import mysql.connector

windows = Tk()
windows.geometry('500x460+200+10')
windows.attributes('-transparentcolor', 'red')
windows.title('forgot password')

22 | P a g e BGS National Public School


Computer Science Investigatory Project 2024-25

def back(): #to go back to login page


windows.destroy()
import loginpg

def submit():
#submit the form to update the password.
username = usernameEntry.get()
email = emailEntry.get()
new_password = NewpasswordEntry.get()
confirm_password = confirmpasswordEntry.get()

if not (username and email and new_password and confirm_password): #


if any field is empty
messagebox.showerror('Error', 'All fields must be filled.')
return
if new_password != confirm_password: #if passwords do not match
messagebox.showerror('Error', 'Passwords do not match.')
return

db = mysql.connector.connect(host='localhost', user='root',
password='password', database='p_registration', charset='utf8')
cursor = db.cursor()
query = 'SELECT * FROM personaldata WHERE email = %s'
cursor.execute(query, (email,))

if cursor.fetchone() is None:
messagebox.showerror('Error', 'Incorrect email or password.')
else:
query = 'UPDATE personaldata SET passwrd = %s WHERE email = %s'
cursor.execute(query, (new_password, email))
db.commit()
db.close()
messagebox.showinfo('Success', 'Successful changes. Please login
with new password.')
windows.destroy()
import loginpg

#frame for entry fields


frame=Frame(windows, width=540, height=640, bg='#690924', bd=8)
frame.place(x=0,y=0)

#labels on window
heading =Label(frame, text='FORGOT PASSWORD', fg='#debcb2', bg='#690924',
font=('Garamond', 20, 'bold'))
heading.place(x=110, y=30)

23 | P a g e BGS National Public School


Computer Science Investigatory Project 2024-25

#username
usernamelbl = Label(frame, text='Username:', fg='#debcb2', bg='#690924',
font=('Book Antiqua', 15, 'bold'))
usernamelbl.place(x=10, y=100)
usernameEntry=Entry(frame, width=30, borderwidth=2)
usernameEntry.place(x=250, y=100)

#email
emaillbl = Label(frame, text='Email:', fg='#debcb2', bg='#690924',
font=('Book Antiqua', 15, 'bold'))
emaillbl.place(x=10, y=150)
emailEntry=Entry(frame, width=30, borderwidth=2)
emailEntry.place(x=250, y=150)

#new password
Newpasswordlbl = Label(frame, text='New Password:', fg='#debcb2',
bg='#690924', font=('Book Antiqua', 15, 'bold'))
Newpasswordlbl.place(x=10, y=200)
NewpasswordEntry=Entry(frame, width=30, borderwidth=2)
NewpasswordEntry.place(x=250, y=200)

#confirm password
confirmPasswordlbl = Label(frame, text='Confirm New Password:',
fg='#debcb2', bg='#690924', font=('Book Antiqua', 15, 'bold'))
confirmPasswordlbl.place(x=10, y=250)
confirmpasswordEntry=Entry(frame, width=30, borderwidth=2)
confirmpasswordEntry.place(x=250, y=250)

#back button
bckbtn = Button(frame, text='<<', width=7, borderwidth=5, height=2,
bg='#debcb2', fg='#690924', cursor='hand2', border=2,command=back)
bckbtn.place(x=10, y=310)

#submit button
submit1btn = Button(frame, text='Submit', width=15, height=2,
bg='#debcb2',fg='#690924', cursor='hand2', border=2, borderwidth=5,
font=('Book Antiqua', 16, 'bold'), command=submit)
submit1btn.place(x=130, y=330)

windows.mainloop()

24 | P a g e BGS National Public School


Computer Science Investigatory Project 2024-25

feedback.py

#customer feedback window


import tkinter as tk
from tkinter import messagebox

# Function to save customer feedback to a text file


def save_feedback():
feedback = feedback_entry.get("1.0", tk.END).strip() # Get feedback
from the text box
if feedback:
with open("customer_feedback.txt", "a") as file:
file.write(feedback + "\n") # Write feedback to the file
with a newline
feedback_entry.delete("1.0", tk.END) # Clear the text box
messagebox.showinfo("Success", "Thank you for your feedback!")
window.destroy()
else:
messagebox.showwarning("Warning", "Please enter your feedback
before submitting.") #if feedback is not entered

# Create the main window


window = tk.Tk()
window.title("Customer Feedback")
window.geometry("600x300")
window.configure(bg='#690924')

# Create a label for instructions


label = tk.Label(window, text="Please enter your
feedback:",bg='#690924',font=("Garamond", 18), fg="#debcb2")
label.pack(pady=10)

# Create a text box for entering feedback


feedback_entry = tk.Text(window, width=50, height=10)
feedback_entry.pack(pady=10)

# Create a submit button


submit_button = tk.Button(window, text="Submit Feedback",
command=save_feedback)
submit_button.pack(pady=10)

# Run the application


window.mainloop()

25 | P a g e BGS National Public School


Computer Science Investigatory Project 2024-25

customer.py

#customer terminal
import csv
import tkinter as tk
from tkinter import filedialog as fd
from PIL import Image, ImageTk

class BookstoreData: #creates a class called bookstore data that stores


book titles
def __init__(self, csv_file):
self.book_titles = []
with open(csv_file, 'r') as f:
reader = csv.reader(f)
for row in reader:
self.book_titles.append(row[0])

class MainWindow:
global master
def __init__(self, master, data):
self.master = master
self.data = data
master.title("Customer window")
master.geometry("800x600")
master.configure(bg='#690924')

# Load the logo image


logo_image = Image.open("catbooks.png")
logo_image = ImageTk.PhotoImage(logo_image)

# Create a label to display the logo and welcome text


welcome_frame = tk.Frame(master, bg='#690924')
welcome_frame.pack(pady=20)

welcome_label = tk.Label(welcome_frame, image=logo_image,


font=("Book Antiqua", 24), bg='#690924', compound="bottom")
welcome_label.image = logo_image
welcome_label.pack(pady=10)
welcome_text = tk.Label(welcome_frame, text="Welcome to
Bookstore!", font=("Book Antiqua", 24), fg="#debcb2", bg='#690924')
welcome_text.pack(pady=10)

# Create a frame for the buttons

26 | P a g e BGS National Public School


Computer Science Investigatory Project 2024-25

button_frame = tk.Frame(master, bg='#690924')


button_frame.pack(pady=20)

#login button
self.login_button = tk.Button(button_frame, text="Login",
command=self.login, font=("Book Antiqua", 18),fg='#690924',bg="#debcb2")
self.login_button.pack(side=tk.LEFT, padx=10)

#register button
self.register_button = tk.Button(button_frame, text="Register",
command=self.register, font=("Book Antiqua",
18),fg='#690924',bg="#debcb2")
self.register_button.pack(side=tk.LEFT, padx=10)

#function for loginbutton


def login(self):
self.master.destroy()
import loginpg

#function for refister button


def register(self):
self.master.destroy()
import registration

root = tk.Tk()
data = BookstoreData('Book.csv')
my_gui = MainWindow(root, data)

root.mainloop()

cdata.py

#customer details window


import tkinter as tk
import mysql.connector

# Create connection
db = mysql.connector.connect(host="localhost", user="root",
password="password", database="p_registration", charset='utf8')
cursor = db.cursor()
cursor.execute("SELECT * FROM personaldata")
result = cursor.fetchall()

# Fetch column names

27 | P a g e BGS National Public School


Computer Science Investigatory Project 2024-25

column_names = [i[0] for i in cursor.description]

# Create a Tkinter window


root = tk.Tk()
root.title("Admin Page - Personal Data")
root.configure(bg='#65041d')

# Create a title label


title_label = tk.Label(root, text="Admin Page", font=('Garamond', 24,
'bold'), fg='#debcb2', bg='#65041d')
title_label.pack(pady=20) # Add some vertical padding

# Create a frame for the table


table_frame = tk.Frame(root)
table_frame.pack()
table_frame.configure(bg='#65041d')

# Display column names as headers


for j, col_name in enumerate(column_names):
header = tk.Label(table_frame, text=col_name.upper(), width=20,
font=('Book Antiqua', 15), fg='#debcb2', bg='#65041d')
header.grid(row=0, column=j, padx=0, pady=0)

# Create a table-like structure using Entry widgets


for i, row in enumerate(result):
for j, value in enumerate(row):
e = tk.Entry(table_frame, width=18, fg='black', font=('Book
Antiqua', 16, 'bold'), borderwidth=0, highlightthickness=0)
e.grid(row=i + 1, column=j, padx=0, pady=0)
e.insert(0, value)

# Configure grid weights to ensure proper resizing


for j in range(len(column_names)):
table_frame.grid_columnconfigure(j, weight=1)

# Create a Back button


back_button = tk.Button(root, text="Back", command=lambda:
back_window(root), font=('Book Antiqua', 14), bg='#debcb2', fg='black')
back_button.pack(pady=20) # Add some vertical padding

# Function to go back to admin page


def back_window(root):
root.destroy()
import adminhub

root.mainloop()

28 | P a g e BGS National Public School


Computer Science Investigatory Project 2024-25

cursor.close()
db.close()

cart.py

#customer cart window


import tkinter as tk
from tkinter import messagebox
import pickle

class CartWindow: #class for cart


def __init__(self, root): #constructor for cart
self.root = root
self.root.title("Bookstore Cart")
self.root.geometry("660x300")
self.root.configure(bg='#65041d')

# Create frames for categories and buttons with the same


background color
self.category_frame = tk.Frame(self.root, bg='#65041d')
self.category_frame.pack(fill="x")

self.button_frame = tk.Frame(self.root, bg='#65041d')


self.button_frame.pack(fill="x")

# Create labels for categories


self.category_labels = []
categories = ["BOOK ID", "NAME", "AUTHOR", "PRICE"]
for i, category in enumerate(categories):
label = tk.Label(self.category_frame, text=category,
bg='#65041d', fg='#dbbcb2',font=("Book Antiqua", 14, 'bold') )
label.grid(row=0, column=i)
self.category_labels.append(label)

# Create text boxes to display data from binary file


self.text_boxes = []
for i in range(4): # Updated to 4 for Book ID
text_box = tk.Text(self.category_frame, width=20, height=10,
bg='white', fg='#65041d')
text_box.grid(row=1, column=i)
text_box.config(state=tk.DISABLED) # Make text box
uneditable
self.text_boxes.append(text_box)

29 | P a g e BGS National Public School


Computer Science Investigatory Project 2024-25

# Create a label for total price


self.total_price_label = tk.Label(self.root, text="Total Price:
₹0.00", font=("Arial", 14), bg='#65041d', fg='white')
self.total_price_label.pack(side="left") # Shifted to the left

# Create buttons for delete and back, then checkout


self.delete_frame = tk.Frame(self.button_frame, bg='#65041d')
self.delete_frame.pack(side="left")

self.delete_label = tk.Label(self.delete_frame, text="Enter Book


ID:", bg='#65041d', fg='white')
self.delete_label.pack(side="left")

self.delete_entry = tk.Entry(self.delete_frame, width=10)


self.delete_entry.pack(side="left")

self.delete_button = tk.Button(self.delete_frame, text="Delete",


command=self.delete_book, bg='#dbbcb2', fg='#65041d')
self.delete_button.pack(side="left", padx=10, pady=10)

self.back_button = tk.Button(self.button_frame, text="Back",


command=lambda: back_window(root), bg='#dbbcb2', fg='#65041d')
self.back_button.pack(side="left", padx=10, pady=10)

self.checkout_button = tk.Button(self.button_frame,
text="Checkout", command=self.checkout, bg='#dbbcb2', fg='#65041d')
self.checkout_button.pack(side="left", padx=10, pady=10)

def back_window(root):
root.destroy()
import main

# Load data from binary file


self.load_data()

def load_data(self):
self.data = [] # Store the book data
total_price = 0.0 # Initialize total price
try:
with open('books.bin', 'rb') as f:
while True:
try:
item = pickle.load(f)
self.data.append(item)
total_price += item[3] #item[3] is the price
except EOFError:

30 | P a g e BGS National Public School


Computer Science Investigatory Project 2024-25

break

# Clear text boxes before inserting new data


for text_box in self.text_boxes:
text_box.config(state=tk.NORMAL) # Temporarily enable
editing to clear text
text_box.delete(1.0, tk.END)
text_box.config(state=tk.DISABLED) # Disable editing
again

# Insert data into text boxes


for item in self.data:
for i in range(4): # Updated to 4 for Book ID
self.text_boxes[i].config(state=tk.NORMAL) #
Temporarily enable editing to insert text
self.text_boxes[i].insert(tk.END, str(item[i]) + "\
n")
self.text_boxes[i].config(state=tk.DISABLED) #
Disable editing again

# Update total price label


self.total_price_label.config(text=f"Total Price: ₹
{total_price:.2f}", font=("Book Antiqua", 17), bg='#65041d',
fg='#dbbcb2')
except FileNotFoundError:
pass
except Exception as e:
messagebox.showerror("Error", f"An error occurred: {e}")

def checkout(self):
messagebox.showinfo("Checkout", "Checkout successful!")
self.root.destroy()
import feedback

def delete_book(self ):
# Get the book ID to delete
book_id = self.delete_entry.get()

# Check if the book exists in the data


for i, item in enumerate(self.data):
if str(item[0]) == book_id: # Compare with book ID
# Remove the book from the data
del self.data[i]

# Update the text boxes


for text_box in self.text_boxes:

31 | P a g e BGS National Public School


Computer Science Investigatory Project 2024-25

text_box.config(state=tk.NORMAL) # Temporarily
enable editing to clear text
text_box.delete(1.0, tk.END)
text_box.config(state=tk.DISABLED) # Disable editing
again

# Re-insert data into text boxes


total_price = 0.0
for item in self.data:
for i in range(4): # Updated to 4 for Book ID
self.text_boxes[i].config(state=tk.NORMAL) #
Temporarily enable editing to insert text
self.text_boxes[i].insert(tk.END, str(item[i]) +
"\n")
self.text_boxes[i].config(state=tk.DISABLED) #
Disable editing again
total_price += item[3] # Assuming item[3] is the
price

# Update total price label


self.total_price_label.config(text=f"Total Price: ₹
{total_price:.2f}")
messagebox.showinfo("Delete", "Book deleted
successfully!")
self.delete_entry.delete(0, tk.END) # Clear the entry
field
return
#if book isn't added to the cart
messagebox.showerror("Error", "Book not found!")

root = tk.Tk()
cart_window = CartWindow(root)
root.mainloop()

booksdata.py

#books data window


import tkinter as tk
from tkinter import messagebox, simpledialog
import mysql.connector

# MySQL database connection parameters


db_config = {

32 | P a g e BGS National Public School


Computer Science Investigatory Project 2024-25

'host': 'localhost','user': 'root','password': 'password','database':


'p_registration',
'charset': 'utf8'}

# Connect to the MySQL database


cnx = mysql.connector.connect(**db_config)
cursor = cnx.cursor()

# Function to fetch book details from the database


def fetch_books():
query = "SELECT book_name, rating FROM book_details"
cursor.execute(query)
return cursor.fetchall()

# Function to update the rating of a selected book


def update_rating():
selected_book_index = book_listbox.curselection()
if not selected_book_index:
messagebox.showwarning("Please select a book to update.") #if
book is not selected
return

selected_book_info = book_listbox.get(selected_book_index)
book_name = selected_book_info.split(" - ")[0] # Extract book name
# Get the new rating from the user
new_rating = simpledialog.askfloat("Update Rating", f"Enter new
rating for '{book_name}':", minvalue=0.0, maxvalue=5.0)

if new_rating is not None:


query = "UPDATE book_details SET rating = %s WHERE book_name =
%s"
try:
cursor.execute(query, (new_rating, book_name))
cnx.commit() # Commit the changes
print(f"Affected rows: {cursor.rowcount}") # Check affected
rows
refresh_book_list() # Refresh the book list
messagebox.showinfo("Success", f"Updated rating for
'{book_name}' to {new_rating}.")
except mysql.connector.Error as err:
print(f"Error: {err}")
messagebox.showerror("Error", f"Failed to update rating:
{err}")

# Function to refresh the book list display


def refresh_book_list():

33 | P a g e BGS National Public School


Computer Science Investigatory Project 2024-25

book_listbox.delete(0, tk.END) # Clear the current list


books = fetch_books()
for book, rating in books:
book_listbox.insert(tk.END, f"{book} - Rating: {rating}")

# Function to handle the Back button click


def go_back():
window.destroy()
import adminhub

# Create the main window


window = tk.Tk()
window.title("Book Ratings")
window.geometry("400x300")
window.configure(bg='#65041d')

# Create a listbox to display books


book_listbox = tk.Listbox(window, width=50)
book_listbox.pack(pady=20)

# Populate the listbox with book data from the database


refresh_book_list()

# Create a button to update the rating


update_button = tk.Button(window, text="Update Rating",
command=update_rating)
update_button.pack(pady=10)

# Create a Back button


back_button = tk.Button(window, text="Back", command=go_back)
back_button.pack(pady=10)

# Run the application


window.mainloop()
# Close the database connection when the application is closed
cnx.close()

AWalktoRemember.py

#a walk to remember (book window)


import tkinter as tk
from PIL import Image, ImageTk

34 | P a g e BGS National Public School


Computer Science Investigatory Project 2024-25

import pickle
import mysql.connector

def back_to_main():
root.destroy()
import store

# Connect to the database


db =
mysql.connector.connect(host="localhost",user="root",password="password",
database="p_registration",charset="utf8")

# Create a cursor object to execute queries


cursor = db.cursor()
# Execute the query to retrieve book details
query = "SELECT * FROM book_details WHERE book_name = 'A Walk to
remember'"
cursor.execute(query)
result = cursor.fetchone()

# Close the cursor and database connection


cursor.close()
db.close()

# Extract the book details from the result


book_id=result[0]
book_name = result[1]
author = result[2]
price = result[3]
rating = result[4]

root = tk.Tk()
root.title("A Walk to Remember")
root.geometry("400x600") # Set the window size to 400x600 pixels
root.configure(bg='#65041d')

# Load the image


image = Image.open("A WALK TO REMEMBER.jpg")
photo = ImageTk.PhotoImage(image)

# Create a label with the image


image_label = tk.Label(root, image=photo)
image_label.image = photo # Keep a reference to the image
image_label.pack()

def add_to_cart():

35 | P a g e BGS National Public School


Computer Science Investigatory Project 2024-25

f=open('books.bin','ab')
l=[book_id,book_name,author,price,rating]
pickle.dump(l,f)
print("Book added to cart")

# Create a label with the book title and author


book_label = tk.Label(root, text=f"NAME : {book_name}\n\nAUTHOR:
{author}\n\nPRICE: {price}\n\nRATING: {rating}\n",
font=("Book Antiqua", 18), fg='#debcb2',
bg='#65041d')
book_label.pack()

# Create buttons for "Back" and "Add to Cart"


back_button = tk.Button(root, text="Back", command=back_to_main,
bg='#debcb2', fg='#65041d')
back_button.pack(side=tk.TOP, padx=10)
add_to_cart_button = tk.Button(root, text="Add to Cart",
command=add_to_cart, bg='#debcb2', fg='#65041d')
add_to_cart_button.pack(side=tk.TOP, padx=50, pady=10)

root.mainloop()

ATaleofTwoCities.py

#a tale of two cities (book window)


import tkinter as tk
from PIL import Image, ImageTk
import pickle
import mysql.connector

def back_to_main():
root.destroy()
import store

# Connect to the database


db =
mysql.connector.connect(host="localhost",user="root",password="password",
database="p_registration",charset="utf8")

# Create a cursor object to execute queries


cursor = db.cursor()

# Execute the query to retrieve book details

36 | P a g e BGS National Public School


Computer Science Investigatory Project 2024-25

query = "SELECT * FROM book_details WHERE book_name = 'A Tale of Two


Cities'"
cursor.execute(query)
result = cursor.fetchone()

# Close the cursor and database connection


cursor.close()
db.close()

# Extract the book details from the result


book_id=result[0]
book_name = result[1]
author = result[2]
price = result[3]
rating = result[4]

root = tk.Tk()
root.title("A Tale of 2 cities")
root.geometry("400x600") # Set the window size to 400x600 pixels
root.configure(bg='#65041d')

# Load the image


image = Image.open("a tale of 2 cities.jpg")
photo = ImageTk.PhotoImage(image)

# Create a label with the image


image_label = tk.Label(root, image=photo)
image_label.image = photo # Keep a reference to the image
image_label.pack()

def add_to_cart():
f=open('books.bin','ab')
l=[book_id,book_name,author,price,rating]
pickle.dump(l,f)
print("Book added to cart")

# Create a label with the book title and author


book_label = tk.Label(root, text=f"NAME : {book_name}\n\nAUTHOR:
{author}\n\nPRICE: {price}\n\nRATING: {rating}\n",
font=("Book Antiqua", 18), fg='#debcb2',
bg='#65041d')
book_label.pack()

# Create buttons for "Back" and "Add to Cart"


back_button = tk.Button(root, text="Back", command=back_to_main,
bg='#debcb2', fg='#65041d')

37 | P a g e BGS National Public School


Computer Science Investigatory Project 2024-25

back_button.pack(side=tk.TOP, padx=10)
add_to_cart_button = tk.Button(root, text="Add to Cart",
command=add_to_cart, bg='#debcb2', fg='#65041d')
add_to_cart_button.pack(side=tk.TOP, padx=50, pady=10)

root.mainloop()

AStrangerintheMirror.py

#a stranger in the mirror (book window)


import tkinter as tk
from PIL import Image, ImageTk
import pickle
import mysql.connector

def back_to_main():
root.destroy()
import store

# Connect to the database


db = mysql.connector.connect(host="localhost",
user="root",password="password",
database="p_registration",charset="utf8")

# Create a cursor object to execute queries

38 | P a g e BGS National Public School


Computer Science Investigatory Project 2024-25

cursor = db.cursor()

# Execute the query to retrieve book details


query = "SELECT * FROM book_details WHERE book_name = 'A Stranger in the
Mirror'"
cursor.execute(query)

result = cursor.fetchone()

# Close the cursor and database connection


cursor.close()
db.close()

# Extract the book details from the result


book_id=result[0]
book_name = result[1]
author = result[2]
price = result[3]
rating = result[4]

root = tk.Tk()
root.title("A Stranger in the Mirror")
root.geometry("400x600") # Set the window size to 400x600 pixels
root.configure(bg='#65041d')

# Load the image


image = Image.open("A STRANGER IN THE MIRROR.jpg")
photo = ImageTk.PhotoImage(image)

# Create a label with the image


image_label = tk.Label(root, image=photo)
image_label.image = photo # Keep a reference to the image
image_label.pack()

def add_to_cart():
f=open('books.bin','ab')
l=[book_id,book_name,author,price,rating]
pickle.dump(l,f)
print("Book added to cart")

# Create a label with the book title and author


book_label = tk.Label(root, text=f"NAME : {book_name}\n\nAUTHOR:
{author}\n\nPRICE: {price}\n\nRATING: {rating}\n",
font=("Book Antiqua", 18), fg='#debcb2',
bg='#65041d')
book_label.pack()

39 | P a g e BGS National Public School


Computer Science Investigatory Project 2024-25

# Create buttons for "Back" and "Add to Cart"


back_button = tk.Button(root, text="Back", command=back_to_main,
bg='#debcb2', fg='#65041d')
back_button.pack(side=tk.TOP, padx=10)
add_to_cart_button = tk.Button(root, text="Add to Cart",
command=add_to_cart, bg='#debcb2', fg='#65041d')
add_to_cart_button.pack(side=tk.TOP, padx=50, pady=10)

root.mainloop()

AnAbundanceofKatherines.py

#an abundance of katherine (book window)


import tkinter as tk
from PIL import Image, ImageTk
import pickle
import mysql.connector

def back_to_main():
root.destroy()
import store

# Connect to the database


db =
mysql.connector.connect(host="localhost",user="root",password="password",
database="p_registration",charset="utf8")

# Create a cursor object to execute queries


cursor = db.cursor()

# Execute the query to retrieve book details


query = "SELECT * FROM book_details WHERE book_name = 'An Abundance of
Katherines'"
cursor.execute(query)
result = cursor.fetchone()

# Close the cursor and database connection


cursor.close()
db.close()

# Extract the book details from the result ( gui- to display in window)
book_id = result[0]
book_name = result[1]

40 | P a g e BGS National Public School


Computer Science Investigatory Project 2024-25

author = result[2]
price = result[3]
rating = result [4]

root = tk.Tk()
root.title("An abundance of katherines")
root.geometry("400x600")
root.configure(bg='#65041d') # Set the window size to 400x600 pixels

# Load the image


image = Image.open("An abundance of katherines.jpg")
photo = ImageTk.PhotoImage(image)

# Create a label with the image


image_label = tk.Label(root, image=photo)
image_label.image = photo # Keep a reference to the image
image_label.pack()

def add_to_cart():
f=open('books.bin','ab')
l=[book_id,book_name,author,price,rating]
pickle.dump(l,f)
print("Book added to cart")

# Create a label with the book title and author


book_label = tk.Label(root, text=f"NAME : {book_name}\n\nAUTHOR:
{author}\n\nPRICE: {price}\n\nRATING: {rating}\n",
font=("Book Antiqua", 18), fg='#debcb2',
bg='#65041d')
book_label.pack()

# Create buttons for "Back" and "Add to Cart"


back_button = tk.Button(root, text="Back", command=back_to_main,
bg='#debcb2', fg='#65041d')
back_button.pack(side=tk.TOP, padx=10)
add_to_cart_button = tk.Button(root, text="Add to Cart",
command=add_to_cart, bg='#debcb2', fg='#65041d')
add_to_cart_button.pack(side=tk.TOP, padx=50, pady=10)

root.mainloop()

AllYourPerfects.py

#books data window

41 | P a g e BGS National Public School


Computer Science Investigatory Project 2024-25

import tkinter as tk
from tkinter import messagebox, simpledialog
import mysql.connector

# MySQL database connection parameters


db_config = {
'host': 'localhost','user': 'root','password': 'password','database':
'p_registration',
'charset': 'utf8'}

# Connect to the MySQL database


cnx = mysql.connector.connect(**db_config)
cursor = cnx.cursor()

# Function to fetch book details from the database


def fetch_books():
query = "SELECT book_name, rating FROM book_details"
cursor.execute(query)
return cursor.fetchall()

# Function to update the rating of a selected book


def update_rating():
selected_book_index = book_listbox.curselection()
if not selected_book_index:
messagebox.showwarning("Please select a book to update.") #if
book is not selected
return

selected_book_info = book_listbox.get(selected_book_index)
book_name = selected_book_info.split(" - ")[0] # Extract book name
# Get the new rating from the user
new_rating = simpledialog.askfloat("Update Rating", f"Enter new
rating for '{book_name}':", minvalue=0.0, maxvalue=5.0)

if new_rating is not None:


query = "UPDATE book_details SET rating = %s WHERE book_name =
%s"
try:
cursor.execute(query, (new_rating, book_name))
cnx.commit() # Commit the changes
print(f"Affected rows: {cursor.rowcount}") # Check affected
rows
refresh_book_list() # Refresh the book list
messagebox.showinfo("Success", f"Updated rating for
'{book_name}' to {new_rating}.")
except mysql.connector.Error as err:

42 | P a g e BGS National Public School


Computer Science Investigatory Project 2024-25

print(f"Error: {err}")
messagebox.showerror("Error", f"Failed to update rating:
{err}")

# Function to refresh the book list display


def refresh_book_list():
book_listbox.delete(0, tk.END) # Clear the current list
books = fetch_books()
for book, rating in books:
book_listbox.insert(tk.END, f"{book} - Rating: {rating}")

# Function to handle the Back button click


def go_back():
window.destroy()
import adminhub

# Create the main window


window = tk.Tk()
window.title("Book Ratings")
window.geometry("400x300")
window.configure(bg='#65041d')

# Create a listbox to display books


book_listbox = tk.Listbox(window, width=50)
book_listbox.pack(pady=20)

# Populate the listbox with book data from the database


refresh_book_list()

# Create a button to update the rating


update_button = tk.Button(window, text="Update Rating",
command=update_rating)
update_button.pack(pady=10)

# Create a Back button


back_button = tk.Button(window, text="Back", command=go_back)
back_button.pack(pady=10)

# Run the application


window.mainloop()
# Close the database connection when the application is closed
cnx.close()

43 | P a g e BGS National Public School


Computer Science Investigatory Project 2024-25

AFlightofPigeons.py

#a flight of pigeons(book window)


import tkinter as tk
from PIL import Image, ImageTk
import pickle
import mysql.connector

def back_to_main():
root.destroy()
import store

# Connect to the database


db =
mysql.connector.connect(host="localhost",user="root",password="password",
database="p_registration",charset="utf8")

# Create a cursor object to execute queries


cursor = db.cursor()

# Execute the query to retrieve book details


query = "SELECT * FROM book_details WHERE book_name = 'A Flight of
Pigeons'"
cursor.execute(query)
result = cursor.fetchone()

# Close the cursor and database connection


cursor.close()
db.close()

# Extract the book details from the result


book_id = result[0]
book_name = result[1]
author = result[2]
price = result[3]
rating = result[4]

root = tk.Tk()
root.title("A FLIGHT OF PIGEONS BY RUSKIN BOND")
root.geometry("400x600") # Set the window size to 400x600 pixels
root.configure(bg='#65041d')

# Load the image


image = Image.open("A FLIGHT OF PIGEONS.jpg")

44 | P a g e BGS National Public School


Computer Science Investigatory Project 2024-25

photo = ImageTk.PhotoImage(image)

# Create a label with the image


image_label = tk.Label(root, image=photo)
image_label.image = photo # Keep a reference to the image
image_label.pack()

def add_to_cart():
f=open('books.bin','ab')
l=[book_id,book_name,author,price,rating]
pickle.dump(l,f)
print("Book added to cart")

# Create a label with the book title and author


book_label = tk.Label(root, text=f"NAME : {book_name}\n\nAUTHOR:
{author}\n\nPRICE: {price}\n\nRATING: {rating}\n",
font=("Book Antiqua", 18), fg='#debcb2',
bg='#65041d')
book_label.pack()

# Create buttons for "Back" and "Add to Cart"


back_button = tk.Button(root, text="Back", command=back_to_main,
bg='#debcb2', fg='#65041d')
back_button.pack(side=tk.TOP, padx=10)
add_to_cart_button = tk.Button(root, text="Add to Cart",
command=add_to_cart, bg='#debcb2', fg='#65041d')
add_to_cart_button.pack(side=tk.TOP, padx=50, pady=10)

root.mainloop()

adminlogin.py
from tkinter import *
from tkinter import messagebox
from PIL import Image, ImageTk
import mysql.connector

# Set up main window with the original color scheme


window = Tk()
window.title("Admin Login")
window.geometry("500x350")
window.configure(bg='#65041d')

# Configure fonts and colors for consistency with the original design
HEADER_FONT = ("Garamond", 24, "bold")

45 | P a g e BGS National Public School


Computer Science Investigatory Project 2024-25

LABEL_FONT = ("Book Antiqua", 14)


BUTTON_FONT = ("Book Antiqua", 10, "bold")
TEXT_COLOR = '#debcb2'
BACKGROUND_COLOR = '#65041d'
BUTTON_COLOR = '#debcb2'
BUTTON_TEXT_COLOR = '#65041d'

# Login Function
def login():
if idEntry.get() == "" or passwdEntry.get() == "":
messagebox.showerror("Alert", "Please enter all fields!")
else:
# Database connection
db = mysql.connector.connect(
host="localhost",
user="root",
password="password",
database="p_registration",
charset="utf8"
)
cur = db.cursor()
query = "SELECT * FROM adminpage WHERE A_PASSWORD=%s"
cur.execute(query, (passwdEntry.get(),))
roles = cur.fetchone()

if roles is None:
messagebox.showerror("Alert", "Incorrect name or password")
else:
messagebox.showinfo("Success", "Login successful!")
idEntry.delete(0, END)
passwdEntry.delete(0, END)
window.destroy()
import adminhub

# Toggle show/hide password


def toggle_password():
if passwdEntry.cget("show") == "":
passwdEntry.config(show="*")
toggle_button.config(text="Show")
else:
passwdEntry.config(show="")
toggle_button.config(text="Hide")

# Header
heading = Label(window, text="~ Admin Sign In ~", font=HEADER_FONT,
fg=TEXT_COLOR, bg=BACKGROUND_COLOR)

46 | P a g e BGS National Public School


Computer Science Investigatory Project 2024-25

heading.pack(pady=20)

# Frame for input fields


frame = Frame(window, bg=BACKGROUND_COLOR, padx=20, pady=20)
frame.pack()

# Name
id_label = Label(frame, text="Name:", font=LABEL_FONT, fg=TEXT_COLOR,
bg=BACKGROUND_COLOR)
id_label.grid(row=0, column=0, sticky=W, pady=10)
idEntry = Entry(frame, font=LABEL_FONT, width=30)
idEntry.grid(row=0, column=1, padx=10)

# Password
passwd_label = Label(frame, text="Password:", font=LABEL_FONT,
fg=TEXT_COLOR, bg=BACKGROUND_COLOR)
passwd_label.grid(row=1, column=0, sticky=W, pady=10)
passwdEntry = Entry(frame, font=LABEL_FONT, show="*", width=30)
passwdEntry.grid(row=1, column=1, padx=10)

# Toggle show/hide password


toggle_button = Button(frame, text="Show", font=("Arial", 10),
command=toggle_password, fg=TEXT_COLOR, bg=BACKGROUND_COLOR, border=0)
toggle_button.grid(row=1, column=2, padx=5)

# Login Button
login_button = Button(window, text="LOGIN", font=BUTTON_FONT, width=20,
bg=BUTTON_COLOR, fg=BUTTON_TEXT_COLOR, command=login)
login_button.pack(pady=20)

window.mainloop()

adminhub.py

#admin terminal
import csv
import tkinter as tk
from tkinter import filedialog as fd
from PIL import Image, ImageTk
from tkinter import messagebox, scrolledtext

class BookstoreData:
def __init__(self, csv_file):
self.book_titles = []

47 | P a g e BGS National Public School


Computer Science Investigatory Project 2024-25

with open(csv_file, 'r') as f:


reader = csv.reader(f)
for row in reader:
self.book_titles.append(row[0])

class MainWindow:
def __init__(self, master, data):
self.master = master
self.data = data
master.title("Admin Hub")
master.geometry("800x600")
master.configure(bg='#690924')

# Load the logo image


logo_image = Image.open("catbooks.png")
logo_image = ImageTk.PhotoImage(logo_image)

# Create a label to display the logo and welcome text


welcome_frame = tk.Frame(master, bg='#690924')
welcome_frame.pack(pady=20)

welcome_label = tk.Label(welcome_frame, image=logo_image,


font=("Book Antiqua", 24), bg='#690924', compound="bottom")
welcome_label.image = logo_image
welcome_label.pack(pady=10)

welcome_text = tk.Label(welcome_frame, text="Welcome to admin


page!", font=("Book Antiqua", 24), fg="#debcb2", bg='#690924')
welcome_text.pack(pady=10)

# Create a frame for the buttons


button_frame = tk.Frame(master, bg='#690924')
button_frame.pack(pady=20)

self.booksdata_button = tk.Button(button_frame, text="Books


Data", command=self.booksdata, font=("Book Antiqua", 18), fg='#690924',
bg="#debcb2")
self.booksdata_button.pack(side=tk.LEFT, padx=10)

self.customerdata_button = tk.Button(button_frame, text="Customer


Data", command=self.customerdata, font=("Book Antiqua", 18),
fg='#690924', bg="#debcb2")
self.customerdata_button.pack(side=tk.LEFT, padx=10)

48 | P a g e BGS National Public School


Computer Science Investigatory Project 2024-25

self.feedback_button = tk.Button(button_frame, text="Feedback


Data", command=self.display_feedback_window, font=("Book Antiqua", 18),
fg='#690924', bg="#debcb2")
self.feedback_button.pack(side=tk.LEFT, padx=10)

self.logout_button = tk.Button(button_frame, text="Logout",


command=self.logout, font=("Book Antiqua", 18), fg='#690924',
bg="#debcb2")
self.logout_button.pack(side=tk.LEFT, padx=10)

def logout(self): #function to logout


self.master.destroy()

def booksdata(self): #function to go to booksdata


self.master.destroy()
import booksdata

def customerdata(self): #function to go to customerdata


self.master.destroy()
import cdata

#function to display feedback of the customers


def display_feedback_window(self):
feedback_window = tk.Toplevel(self.master) # Using Toplevel to
create a new window
feedback_window.title("Feedback Data")
feedback_window.geometry("600x400")
feedback_window.configure(bg='#690924')

# Create a label for instructions


label = tk.Label(feedback_window, text="Customer Feedback:",
bg='#690924', font=("Garamond", 18), fg="#debcb2")
label.pack(pady=10)

# Create a scrollable text area to display feedback


feedback_display = scrolledtext.ScrolledText(feedback_window,
width=50, height=10, wrap=tk.WORD, font=("Book Antiqua", 12))
feedback_display.pack(pady=10)
feedback_display.config(state="normal") # Make the text area
editable

# Load feedback from the file


try:
with open("customer_feedback.txt", "r") as file:
feedback = file.readlines()

49 | P a g e BGS National Public School


Computer Science Investigatory Project 2024-25

feedback_display.delete("1.0", tk.END) # Clear any


existing text
for line in feedback:
feedback_display.insert(tk.END, line)
except FileNotFoundError:
messagebox.showwarning("Warning", "Feedback file not found.
Please submit feedback first.")

feedback_display.config(state="disabled") # Make the text area


read-only

# Create a Back button to return to the main window


back_button = tk.Button(feedback_window, text="Back",
command=feedback_window.destroy,
font=("Book Antiqua", 12), fg='#690924',
bg="#debcb2", width=8)
back_button.pack(pady=10)

root = tk.Tk()
data = BookstoreData('Book.csv')
my_gui = MainWindow(root, data)

root.mainloop()

ABookofSimpleLiving.py

#a book of simple living (book window)


import tkinter as tk
from PIL import Image, ImageTk
import pickle
import mysql.connector

def back_to_main():
root.destroy()
import store

# Connect to the database


db =
mysql.connector.connect(host="localhost",user="root",password="password",
database="p_registration",charset="utf8")

# Create a cursor object to execute queries


cursor = db.cursor()

50 | P a g e BGS National Public School


Computer Science Investigatory Project 2024-25

# Execute the query to retrieve book details


query = "SELECT * FROM book_details WHERE book_name = 'A Book of Simple
Living'"
cursor.execute(query)
result = cursor.fetchone()

# Close the cursor and database connection


cursor.close()
db.close()

# Extract the book details from the result ( gui- to)


book_id = result[0]
book_name = result[1]
author = result[2]
price = result[3]
rating = result [4]

root = tk.Tk()
root.title("A BOOK OF SIMPLE LIVING BY RUSKIN BOND")
root.geometry("400x600") # Set the window size to 400x600 pixels
root.configure(bg='#65041d')

# Load the image


image = Image.open("A BOOK OF SIMPLE LIVING.jpg")
photo = ImageTk.PhotoImage(image)

# Create a label with the image


image_label = tk.Label(root, image=photo)
image_label.image = photo # Keep a reference to the image
image_label.pack()

def add_to_cart():
f=open('books.bin','ab')
l=[book_id,book_name,author,price,rating]
pickle.dump(l,f)
print("Book added to cart")

# Create a label with the book title and author


book_label = tk.Label(root, text=f"NAME : {book_name}\n\nAUTHOR:
{author}\n\nPRICE: {price}\n\nRATING: {rating}\n",
font=("Book Antiqua", 18), fg='#debcb2',
bg='#65041d')
book_label.pack()

# Create buttons for "Back" and "Add to Cart"

51 | P a g e BGS National Public School


Computer Science Investigatory Project 2024-25

back_button = tk.Button(root, text="Back", command=back_to_main,


bg='#debcb2', fg='#65041d')
back_button.pack(side=tk.TOP, padx=10)
add_to_cart_button = tk.Button(root, text="Add to Cart",
command=add_to_cart, bg='#debcb2', fg='#65041d')
add_to_cart_button.pack(side=tk.TOP, padx=50, pady=10)

root.mainloop()

ABendintheRoad.py

#a bend in the road (book window)


import tkinter as tk
from PIL import Image, ImageTk
import pickle
import mysql.connector

def back_to_main():
root.destroy()
import store

# Connect to the database


db =
mysql.connector.connect(host="localhost",user="root",password="password",
database="p_registration",charset="utf8")

# Create a cursor object to execute queries


cursor = db.cursor()

# Execute the query to retrieve book details


query = "SELECT * FROM book_details WHERE book_name = 'A bend In The
Road'"
cursor.execute(query)
result = cursor.fetchone()

# Close the cursor and database connection


cursor.close()
db.close()

# Extract the book details from the result


book_id = result[0]
book_name = result[1]
author = result[2]
price = result[3]

52 | P a g e BGS National Public School


Computer Science Investigatory Project 2024-25

rating = result [4]

root = tk.Tk()
root.title("A BEND IN THE ROAD")
root.geometry("400x600") # Set the window size to 400x500 pixels
root.configure(bg='#65041d')

# Load the image


image = Image.open("A BEND IN THE ROAD.jpg")
photo = ImageTk.PhotoImage(image)

# Create a label with the image


image_label = tk.Label(root, image=photo)
image_label.image = photo # Keep a reference to the image
image_label.pack()

def add_to_cart():
f=open('books.bin','ab')
l=[book_id,book_name,author,price,rating]
pickle.dump(l,f)
print("Book added to cart")

# Create a label with the book title and author


book_label = tk.Label(root, text=f"NAME : {book_name}\n\nAUTHOR:
{author}\n\nPRICE: {price}\n\nRATING: {rating}\n",
font=("Book Antiqua", 18), fg='#debcb2',
bg='#65041d')
book_label.pack()

# Create buttons for "Back" and "Add to Cart"


back_button = tk.Button(root, text="Back", command=back_to_main,
bg='#debcb2', fg='#65041d')
back_button.pack(side=tk.TOP, padx=10)
add_to_cart_button = tk.Button(root, text="Add to Cart",
command=add_to_cart, bg='#debcb2', fg='#65041d')
add_to_cart_button.pack(side=tk.TOP, padx=50, pady=10)

root.mainloop()

112263.py

#11/22/63 (book window)


import tkinter as tk
from PIL import Image, ImageTk

53 | P a g e BGS National Public School


Computer Science Investigatory Project 2024-25

import pickle
import mysql.connector

def back_to_main():
root.destroy()
import store

# Connect to the database


db =
mysql.connector.connect(host="localhost",user="root",password="password",
database="p_registration",charset="utf8")

# Create a cursor object to execute queries


cursor = db.cursor()

# Execute the query to retrieve book details


query = "SELECT * FROM book_details WHERE book_name = '11/22/63'"
cursor.execute(query)
result = cursor.fetchone()

# Close the cursor and database connection


cursor.close()
db.close()

# Extract the book details from the result


book_id = result[0]
book_name = result[1]
author = result[2]
price = result[3]
rating = result[4]

root = tk.Tk()
root.title("11/22/63 BY STEPHEN KING")
root.geometry("400x600") # Set the window size to 400x500 pixels
root.configure(bg='#65041d')

# Load the image


image = Image.open("112263.jpg")
photo = ImageTk.PhotoImage(image)

# Create a label with the image


image_label = tk.Label(root, image=photo)
image_label.image = photo # Keep a reference to the image
image_label.pack()

def add_to_cart():

54 | P a g e BGS National Public School


Computer Science Investigatory Project 2024-25

f=open('books.bin','ab')
l=[book_id,book_name,author,price,rating]
pickle.dump(l,f)
print("Book added to cart")

# Create a label with the book title and author


book_label = tk.Label(root, text=f"NAME : {book_name}\n\nAUTHOR:
{author}\n\nPRICE: {price}\n\nRATING: {rating}\n",
font=("Book Antiqua", 18), fg='#debcb2',
bg='#65041d')
book_label.pack()

# Create buttons for "Back" and "Add to Cart"


back_button = tk.Button(root, text="Back", command=back_to_main,
bg='#debcb2', fg='#65041d')
back_button.pack(side=tk.TOP, padx=10)
add_to_cart_button = tk.Button(root, text="Add to Cart",
command=add_to_cart, bg='#debcb2', fg='#65041d')
add_to_cart_button.pack(side=tk.TOP, padx=50, pady=10)

root.mainloop()

2States.py

#11/22/63 (book window)


import tkinter as tk
from PIL import Image, ImageTk
import pickle
import mysql.connector

def back_to_main():
root.destroy()
import store

# Connect to the database


db =
mysql.connector.connect(host="localhost",user="root",password="password",
database="p_registration",charset="utf8")

# Create a cursor object to execute queries


cursor = db.cursor()

# Execute the query to retrieve book details


query = "SELECT * FROM book_details WHERE book_name = '11/22/63'"

55 | P a g e BGS National Public School


Computer Science Investigatory Project 2024-25

cursor.execute(query)
result = cursor.fetchone()

# Close the cursor and database connection


cursor.close()
db.close()

# Extract the book details from the result


book_id = result[0]
book_name = result[1]
author = result[2]
price = result[3]
rating = result[4]

root = tk.Tk()
root.title("11/22/63 BY STEPHEN KING")
root.geometry("400x600") # Set the window size to 400x500 pixels
root.configure(bg='#65041d')

# Load the image


image = Image.open("112263.jpg")
photo = ImageTk.PhotoImage(image)

# Create a label with the image


image_label = tk.Label(root, image=photo)
image_label.image = photo # Keep a reference to the image
image_label.pack()

def add_to_cart():
f=open('books.bin','ab')
l=[book_id,book_name,author,price,rating]
pickle.dump(l,f)
print("Book added to cart")

# Create a label with the book title and author


book_label = tk.Label(root, text=f"NAME : {book_name}\n\nAUTHOR:
{author}\n\nPRICE: {price}\n\nRATING: {rating}\n",
font=("Book Antiqua", 18), fg='#debcb2',
bg='#65041d')
book_label.pack()

# Create buttons for "Back" and "Add to Cart"


back_button = tk.Button(root, text="Back", command=back_to_main,
bg='#debcb2', fg='#65041d')
back_button.pack(side=tk.TOP, padx=10)

56 | P a g e BGS National Public School


Computer Science Investigatory Project 2024-25

add_to_cart_button = tk.Button(root, text="Add to Cart",


command=add_to_cart, bg='#debcb2', fg='#65041d')
add_to_cart_button.pack(side=tk.TOP, padx=50, pady=10)

root.mainloop()

LOG OF PROJECT

LOG-1: 12/6/2024
Ideation
Discussion of topic - Book Store Management System
Initial planning of features and functionalities required for the system.

LOG-2: 18/6/2024
Searched for Database Structure
Explored various database designs for the system.
Decided to create three main tables: personal_data, books_details, and adminpage.

LOG-3: 22/6/2024
Learning Tkinter
Learned the basics of Tkinter for GUI design.
Tested creating basic windows and widgets.

LOG-4: 29/6/2024
Created SQL Table personal_data

57 | P a g e BGS National Public School


Computer Science Investigatory Project 2024-25

Created SQL table to store user data


(id,name,phone_no,email,username,password,confirmpassword).
Worked on connecting Python with SQL

LOG-5: 2/7/2024
Created SQL Table books_details
Created SQL table to store book details (book_id, title, author, price, rating).
Inserted initial data for testing.

LOG-6: 10/7/2024
Designed Admin Login Interface
Worked on the Admin login screen using Tkinter.
Integrated Admin login with adminpage table in SQL for authentication.

LOG-7: 14/7/2024
Designed User Registration and Login Interface
Worked on User registration form (storing details in personal_data table).
Implemented User login functionality using Tkinter and SQL.

LOG-8: 20/7/2024
Worked on Book Catalog Display
Created a window to display a list of books using Tkinter.
Integrated book details from books_details SQL table into the UI.

LOG-9: 25/7/2024
Search Feature Implementation
Worked on a search feature that allows users to search books by title or author.
Integrated search functionality with books_details table.

LOG-10: 30/7/2024
Worked on Admin Dashboard

58 | P a g e BGS National Public School


Computer Science Investigatory Project 2024-25

Created an Admin dashboard for managing books ratings.


Connected thiswith SQL queries for managing data in the books_details table.

LOG-11: 5/8/2024
Added Book Purchase Feature
Developed functionality for users to purchase books and add book to cart

LOG-12: 10/8/2024
Worked on Admin Book Management
Developed functionality for the Admin to update book ratings and view customer details
Implemented SQL queries for managing book data in books_details table.

LOG-13: 12/8/2024
Implemented User Profile Page
Worked on User profile page that displays personal details from personal_data table.
Added functionality for users to change their password.

LOG-14: 20/8/2024
Worked on Shopping Cart Function
Developed a shopping cart feature for users to add books and proceed to checkout.
Linked shopping cart with book data from books_details.

LOG-15: 5/9/2024
Bug Fixes and UI Refinement
Fixed issues with the checkout process.
Improved user interface for smoother navigation between features.

LOG-16: 10/9/2024
Worked on Admin User Management
Added functionality for Admin to view user accounts as well as update book ratings.
Worked with personaldata table for user management.

LOG-17: 12/9/2024

59 | P a g e BGS National Public School


Computer Science Investigatory Project 2024-25

Integration of All Functions


Integrated all individual components (Admin Login, Customer login ,book catalog
display, cart window)
Tested the overall flow of the application from user registration to book purchase.

LOG-18: 18/9/2024
Improvements in UI/UX
Refined the layout and design of the user interface using Tkinter.
Enhanced color schemes and added consistent navigation between windows.

LOG-19: 20/9/2024
Bug Fixes and Optimization
Fixed minor bugs related to database connectivity.
Optimized SQL queries for faster performance and smoother user experience.

LOG-20: 25/9/2024
Completion of Project
Final testing and debugging.
Polished UI design and ensured smooth integration of all components.

LOG-21: 28/9/2024
Submission of Project
Completed documentation and final report for submission.

60 | P a g e BGS National Public School


Computer Science Investigatory Project 2024-25

SAMPLE OUTPUT

61 | P a g e BGS National Public School


Computer Science Investigatory Project 2024-25

62 | P a g e BGS National Public School


Computer Science Investigatory Project 2024-25

63 | P a g e BGS National Public School


Computer Science Investigatory Project 2024-25

64 | P a g e BGS National Public School


Computer Science Investigatory Project 2024-25

65 | P a g e BGS National Public School


Computer Science Investigatory Project 2024-25

66 | P a g e BGS National Public School


Computer Science Investigatory Project 2024-25

67 | P a g e BGS National Public School


Computer Science Investigatory Project 2024-25

68 | P a g e BGS National Public School


Computer Science Investigatory Project 2024-25

Bibliography

 Sumita Arora, Computer Science with Python for


Class 12, Dhanpat Rai Publications.

 https://www.geeksforgeeks.org

 http://stackoverflow.com/

 https://www.javatpoint.com

 https://www.google.co.in/

 https://pythonexamples.org

69 | P a g e BGS National Public School

You might also like