Nothing Special   »   [go: up one dir, main page]

12th Showroon Management System

Download as pdf or txt
Download as pdf or txt
You are on page 1of 25

SHREE SWAMINARAYAN

PUBLIC SCHOOL
GANDHINAGAR

COMPUTER SCIENCE INVESTIGATORY PROJECT


On
Showroom management system
2023-24 (CLASS-XII)

SUBMITTED BY: Mihir Amit Mishra


BOARD’S ROLL NO: ___________________________
CERTIFICATE
This is to certify that Mihir Amit Mishra of class XII science has
prepared the investigatory project of Computer Science entitle
Showroom Management System during academic year 2023-24.
He/She has prepared the project under my guidance.

____________ ____________ ____________


Ext. Examiner PGT CS Principal’s Sign
INDEX
Sr.no. Title Pg.no.
1 Acknowledgement 1
2 Objective of project 2
3 Proposed system 3
4 System DEV. Life Cycle 4
5 Modules and purpose 5
6 Source code 6
7 Output 19
8 Requirements 24
9 Biblography 25
ACKNOWLEDGEMENT

I MIHIR AMIT MISHRA would like to express my sincere


gratitude to my Computer Science teacher Mr.
Chandrakant Jadav for his vital support, guidance and
encouragement without which this project would not have
come forth from my side. Special thanks goes to my teacher
who helped me a lot in completing the project by giving
interesting ideas, thoughts and made this project accurate.
I wish to thank my parents for their undivided support and
interest who inspired and encouraged me to go on our way,
without which I would be unable to complete my project.
And at last, but by no mean the least I would like to thank
the almighty God who made all the things possible.
OBJECTIVE OF PROJECT
For most people a car is a very important purchase decisions and with modern
lifestyles it has become a necessity. Today people have many choices when it
comes to cars but the basic experience is about the same. All cars are equally
reliable and offer material standards matching their class. This makes it easy for
consumers to purchase a car without even seeing it. In some places it is not
possible to view a car at the showroom before purchase due to non – availability
of showroom cars or delays in production. This system will allow users to easily
purchase cars from dealers on a web – based interface.

The car manufacturer will be required to upload all the promotional


material for the car such as pictures, videos, interviews, etc. All details about
features, specifications and models will also be available. Links to reviews by
external reviewers can be accessed by users. Besides the promotional photos the
manufacturer will be required to take photos of the different colours of the car in
a prescribed background, so as to allow users to compare the car with other cars.
Users will be able to see pictures of each trim level of the car and this will help
them make an informed choice.

After choosing a car, the user will be allocated a sales representative at


their closest dealership. Users will then have the option to opt for exchange offers
where they sell their current car to the dealership for discounts on the new car.
The dealership will request specific photos and video clips to ascertain the quality
of the car and set a buyback price accordingly. The user will also have the option
to finance their purchase with the dealership’s partner banks. After all these
formalities are completed an official order will be placed and computerised
receipts will be generated.

The user will then be able to track the manufacturing and shipping process
of the car. Shortly before the delivery of the car, the user will have the option to
choose accessories for the car. They will be able to see how it looks by using a
simulating tool that will show how the accessory looks on their car. After such
choices are made the dealer will order the required accessories and fit them on
the car before it is delivered. All the payment formalities will also be completed
by this stage. The dealer will arrange for the vehicle’s registration as well and
keep the car ready for delivery on the scheduled date.
Till now all the interaction between dealer and customer was completed
via the web interface. Now the new car owner can drive to the dealership in their
old car and exchange it for the new one after signing all the required documents.

PROPOSED SYSTEM
Processor: AMD Ryzen 7 4800H

Ram: 16gb DDR4 3200mhz

Storage: 512gb m.2

Graphics: Nvidia RTX 3050


Operating system: Windows 11 home 64 bits
SYSTEM DEV. LIFE CYCLE
MODULES AND PURPOSE
FLOWCHART
TKinter: The tkinter package (“Tk interface”) is the standard Python interface to the
Tcl/Tk GUI toolkit. Both Tk and tkinter are available on most Unix platforms,
including macOS, as well as on Windows systems.

MySQL.connector: MySQL Connector/Python enables Python programs to access


MySQL databases, using an API that is compliant with the Python Database API
Specification v2.0 (PEP 249). It is written in pure Python and does not have any
dependencies except for the Python Standard Library.
SOURCE CODE
#Importing the required modules
import tkinter
from tkinter import *
from tkinter import ttk
from tkinter import font
from tkinter import messagebox
import mysql.connector

#Connecting to the database and creating table


db=mysql.connector.connect(user="root",passwd="VENOMRoit17@",host="localhost")

my_cursor=db.cursor() #getting the cursor object


my_cursor.execute("CREATE DATABASE IF NOT EXISTS Showroom") #creating the
database named library

db=mysql.connector.connect(user="root",passwd="VENOMRoit17@",host="localhost",dat
abase='Showroom')
my_cursor=db.cursor()
#query to create a table products
query="CREATE TABLE IF NOT EXISTS products (date VARCHAR(10),prodName
VARCHAR(20), prodPrice VARCHAR(50))"
my_cursor.execute(query) #executing the query

db=mysql.connector.connect(user="root",passwd="VENOMRoit17@",host="localhost",dat
abase='Showroom')
my_cursor=db.cursor()
#query to create a table sale
query="CREATE TABLE IF NOT EXISTS sale (custName VARCHAR(20), date VARCHAR(10),
prodName VARCHAR(30),qty INTEGER, price INTEGER )"
my_cursor.execute(query) #executing the query

#Function to add the product to the database


def prodtoTable():
#Getting the user inputs of product details from the user
pname= prodName.get()
price = prodPrice.get()
dt = date.get()
#Connecting to the database
db=mysql.connector.connect(user="root",passwd="VENOMRoit17@",host="localhost"
,database='Showroom')
cursor = db.cursor()
#query to add the product details to the table
query = "INSERT INTO products(date,prodName,prodPrice) VALUES(%s,%s,%s)"
details = (dt,pname,price)

#Executing the query and showing the pop up message


try:
cursor.execute(query,details)
db.commit()
messagebox.showinfo('Success',"Product added successfully")
except Exception as e:
print("The exception is:",e)
messagebox.showinfo("Error","Trouble adding data into Database")

wn.destroy()
#Function to get details of the product to be added
def addProd():
global prodName, prodPrice, date, Canvas1, wn

#Creating the window


wn = tkinter.Tk()
wn.title("AGENT 77's Showroom")
wn.configure(bg='White')
wn.minsize(width=500,height=500)
wn.geometry("1920x1080")

Canvas1 = Canvas(wn)
Canvas1.config(bg='Green')
Canvas1.pack(expand=True,fill=BOTH)

headingFrame1 = Frame(wn,bg='Green',bd=5)
headingFrame1.place(relx=0.25,rely=0.1,relwidth=0.5,relheight=0.13)
headingLabel = Label(headingFrame1, text="Cars shipped in godown",
fg='Black', font=('Courier',15,'bold'))
headingLabel.place(relx=0,rely=0, relwidth=1, relheight=1)

labelFrame = Frame(wn)
labelFrame.place(relx=0.1,rely=0.4,relwidth=0.8,relheight=0.4)

# Getting Date
lable1 = Label(labelFrame,text="Date of shipping: ", fg='black')
lable1.place(relx=0.05,rely=0.3, relheight=0.08)

date = Entry(labelFrame)
date.place(relx=0.3,rely=0.3, relwidth=0.62, relheight=0.08)
# Product Name
lable2 = Label(labelFrame,text="Car's model : ", fg='black')
lable2.place(relx=0.05,rely=0.45, relheight=0.08)

prodName = Entry(labelFrame)
prodName.place(relx=0.3,rely=0.45, relwidth=0.62, relheight=0.08)

# Product Price
lable3 = Label(labelFrame,text="On road price : ", fg='black')
lable3.place(relx=0.05,rely=0.6, relheight=0.08)

prodPrice = Entry(labelFrame)
prodPrice.place(relx=0.3,rely=0.6, relwidth=0.62, relheight=0.08)

#Add Button
Btn = Button(wn,text="ADD",bg='#d1ccc0', fg='black',command=prodtoTable)
Btn.place(relx=0.28,rely=0.85, relwidth=0.18,relheight=0.08)

Quit= Button(wn,text="Quit",bg='#f7f1e3', fg='black',command=wn.destroy)


Quit.place(relx=0.53,rely=0.85, relwidth=0.18,relheight=0.08)

wn.mainloop()

#Function to remove the product from the database


def removeProd():
#Getting the product name from the user to be removed
name = prodName.get()
name = name.lower()

#Connecting to the database


db=mysql.connector.connect(user="root",passwd="VENOMRoit17@",host="localhost"
,database='Showroom')
cursor = db.cursor()

#Query to delete the respective product from the database


query = "DELETE from products where LOWER(prodName) = '"+name+"'"
#Executing the query and showing the message box
try:
cursor.execute(query)
db.commit()
#cur.execute(deleteIssue)
#con.commit()

messagebox.showinfo('Success',"Product Record Deleted Successfully")


except Exception as e:
print("The exception is:",e)
messagebox.showinfo("Please check Car's Model")

wn.destroy()
#Function to get product details from the user to be deleted
def delProd():

global prodName, Canvas1, wn


#Creating a window
wn = tkinter.Tk()
wn.title("AGENT 77's Showroom")
wn.configure(bg='mint cream')
wn.minsize(width=500,height=500)
wn.geometry("700x600")

Canvas1 = Canvas(wn)
Canvas1.config(bg="misty rose")
Canvas1.pack(expand=True,fill=BOTH)

headingFrame1 = Frame(wn,bg="misty rose",bd=5)


headingFrame1.place(relx=0.25,rely=0.1,relwidth=0.5,relheight=0.13)
headingLabel = Label(headingFrame1, text="Delete record", fg='grey19',
font=('Courier',15,'bold'))
headingLabel.place(relx=0,rely=0, relwidth=1, relheight=1)

labelFrame = Frame(wn)
labelFrame.place(relx=0.1,rely=0.3,relwidth=0.8,relheight=0.5)

# Product Name to Delete


lable = Label(labelFrame,text="Model Name : ", fg='black')
lable.place(relx=0.05,rely=0.5)

prodName = Entry(labelFrame)
prodName.place(relx=0.3,rely=0.5, relwidth=0.62)

#Delete Button
Btn = Button(wn,text="DELETE",bg='#d1ccc0', fg='black',command=removeProd)
Btn.place(relx=0.28,rely=0.9, relwidth=0.18,relheight=0.08)

Quit = Button(wn,text="Quit",bg='#f7f1e3', fg='black', command=wn.destroy)


Quit.place(relx=0.53,rely=0.9, relwidth=0.18,relheight=0.08)

wn.mainloop()
#Function to show all the products in the database
def viewProds():
global wn
#Creating the window to show the products details
wn = tkinter.Tk()
wn.title("Agent 77's showroom")
wn.configure(bg='mint cream')
wn.minsize(width=500,height=500)
wn.geometry("700x600")

Canvas1 = Canvas(wn)
Canvas1.config(bg="old lace")
Canvas1.pack(expand=True,fill=BOTH)

headingFrame1 = Frame(wn,bg='old lace',bd=5)


headingFrame1.place(relx=0.25,rely=0.1,relwidth=0.5,relheight=0.13)

headingLabel = Label(headingFrame1, text="View Model", fg='black', font =


('Courier',15,'bold'))
headingLabel.place(relx=0,rely=0, relwidth=1, relheight=1)

labelFrame = Frame(wn)
labelFrame.place(relx=0.1,rely=0.3,relwidth=0.8,relheight=0.5)
y = 0.25

#Connecting to database
db=mysql.connector.connect(user="root",passwd="VENOMRoit17@",host="localhost"
,database='Showroom')
cursor=db.cursor()
#query to select all products from the table
query = 'SELECT * FROM products'

Label(labelFrame, text="%-50s%-50s%-50s"%('Date','Product','Price'),font =
('calibri',11,'bold'),
fg='black').place(relx=0.07,rely=0.1)
Label(labelFrame, text = "---------------------------------------------------
-------------------------",fg='black').place (relx=0.05,rely=0.2)
#Executing the query and showing the products details
try:
cursor.execute(query)
res = cursor.fetchall()

for i in res:
Label(labelFrame,text="%-50s%-50s%-50s"%(i[0],i[1],i[2])
,fg='black').place(relx=0.07,rely=y)
y += 0.1
except Exception as e:
print("The exception is:",e)
messagebox.showinfo("Failed to fetch records from database")

Quit= Button(wn,text="Quit",bg='#f7f1e3', fg='black', command=wn.destroy)


Quit.place(relx=0.4,rely=0.9, relwidth=0.18,relheight=0.08)

wn.mainloop()

#Function to generate the bill


def bill():
#Creating a window
wn = tkinter.Tk()
wn.title("AGENT 77 Showroom")
wn.configure(bg='lavender blush2')
wn.minsize(width=500,height=500)
wn.geometry("700x600")

headingFrame1 = Frame(wn,bg="lavender blush2",bd=5)


headingFrame1.place(relx=0.2,rely=0.1,relwidth=0.6,relheight=0.16)
headingLabel = Label(headingFrame1, text="Bill", fg='grey19',
font=('Courier',15,'bold'))
headingLabel.place(relx=0,rely=0, relwidth=1, relheight=1)

labelFrame = Frame(wn)
labelFrame.place(relx=0.1,rely=0.3,relwidth=0.8,relheight=0.5)

y = 0.35
Label(labelFrame, text="%-40s%-40s%-40s%-
40s"%('Product','Price','Quantity','Total'),font = ('calibri',11,'bold'),
fg='black').place(relx=0.07,rely=0.2)

#Getting date and customer name


dt=date.get()
cName=custName.get()
totalBill=0
#Connecting to database
db=mysql.connector.connect(user="root",passwd="VENOMRoit17@",host="localhost"
,database='Showrom')
cursor=db.cursor()
#query to select all the products
query = 'SELECT * FROM products'
#Checking if the quantity of the 1st product is entered and calculating
price, showing it on window and adding to database
if(len(name1.get()) != 0):
i=res[0]
qty=int(name1.get())
total=qty*int(i[2])
Label(labelFrame,text="%-40s%-40s%-40s%-40s"%(i[1],i[2],qty,total)
,fg='black').place(relx=0.07,rely=y)
totalBill+=total
y+=0.1

query = "INSERT INTO sale(custName,date,prodName,qty,price)


VALUES(%s,%s,%s,%s,%s)"
details = (cName,dt,i[1],qty,total)

#Checking if the quantity of the 2nd product is entered and calculating


price, showing it on window and adding to database
if(len(name2.get()) != 0):
i=res[1]
qty=int(name2.get())
total=qty*int(i[2])
Label(labelFrame,text="%-40s%-40s%-40s%-40s"%(i[1],i[2],qty,total)
,fg='black').place(relx=0.07,rely=y)
totalBill+=total
y+=0.1
query = "INSERT INTO sale(custName,date,prodName,qty,price)
VALUES(%s,%s,%s,%s,%s)"
details = (cName,dt,i[1],qty,total)

#Checking if the quantity of the 3rd product is entered and calculating


price, showing it on window and adding to database
if(len(name3.get()) != 0):
i=res[2]
qty=int(name3.get())
total=qty*int(i[2])
Label(labelFrame,text="%-40s%-40s%-40s%-40s"%(i[1],i[2],qty,total)
,fg='black').place(relx=0.07,rely=y)
totalBill+=total
y+=0.1
query = "INSERT INTO sale(custName,date,prodName,qty,price)
VALUES(%s,%s,%s,%s,%s)"
details = (cName,dt,i[1],qty,total)
#showing total of the bill
Label(labelFrame, text = "---------------------------------------------------
---------------------------------",fg='black').place (relx=0.05,rely=y)
y+=0.1
Label(labelFrame,text="\t\t\t\t\t\t\t\t"+str(totalBill)
,fg='black').place(relx=0.07,rely=y)

Quit = Button(wn,text="Quit",bg='#f7f1e3', fg='black', command=wn.destroy)


Quit.place(relx=0.53,rely=0.9, relwidth=0.18,relheight=0.08)

wn.mainloop()
#Function to take the inputs form the user to generate bill
def newCust():
global wn,name1,name2,name3,date,custName
#Creating a window
wn = tkinter.Tk()
wn.title("Agent77's Showroom")
wn.configure(bg='lavender blush2')
wn.minsize(width=500,height=500)
wn.geometry("700x600")

headingFrame1 = Frame(wn,bg="lavender blush2",bd=5)


headingFrame1.place(relx=0.2,rely=0.1,relwidth=0.6,relheight=0.16)
headingLabel = Label(headingFrame1, text="New Buyer", fg='grey19',
font=('Courier',15,'bold'))
headingLabel.place(relx=0,rely=0, relwidth=1, relheight=1)

lable1 = Label(wn,text="Date : ", fg='black')


lable1.place(relx=0.05,rely=0.3, )

#Getting date
date = Entry(wn)
date.place(relx=0.3,rely=0.3, relwidth=0.62)

lable2 = Label(wn,text="Customer Name : ", fg='black')


lable2.place(relx=0.05,rely=0.4, )

#Getting customer name


custName = Entry(wn)
custName.place(relx=0.3,rely=0.4, relwidth=0.62)

labelFrame = Frame(wn)
labelFrame.place(relx=0.1,rely=0.45,relwidth=0.8,relheight=0.4)

y = 0.3
Label(labelFrame, text="Number of Cars to buy",font = ('calibri',11,'bold'),
fg='black').place(relx=0.07,rely=0.1)

Label(labelFrame, text="%-50s%-50s%-30s"%('Product','Price','Quantity'),font
= ('calibri',11,'bold'),
fg='black').place(relx=0.07,rely=0.2)

#Connecting to the database


db=mysql.connector.connect(user="root",passwd="VENOMRoit17@",host="localhost"
,database='Showroom')
cursor=db.cursor()
query = 'SELECT * FROM products'

cursor.execute(query)
res = cursor.fetchall()
print(res)
c=1

#Showing all the products and creating entries to take the input of the
quantity
i=res[0]
Label(labelFrame,text="%-50s%-50s"%(i[1],i[2])
,fg='black').place(relx=0.07,rely=y)
name1 = Entry(labelFrame)
name1.place(relx=0.6,rely=y, relwidth=0.2)
y += 0.1

i=res[1]
Label(labelFrame,text="%-50s%-50s"%(i[1],i[2])
,fg='black').place(relx=0.07,rely=y)
name2 = Entry(labelFrame)
name2.place(relx=0.6,rely=y, relwidth=0.2)
y += 0.1

i=res[2]
Label(labelFrame,text="%-50s%-50s"%(i[1],i[2])
,fg='black').place(relx=0.07,rely=y)
name3 = Entry(labelFrame)
name3.place(relx=0.6,rely=y, relwidth=0.2)
y += 0.1

#Button to generate bill


Btn= Button(wn,text="Generate Bill",bg='#d1ccc0', fg='black',command=bill)
Btn.place(relx=0.28,rely=0.9, relwidth=0.18,relheight=0.08)

Quit = Button(wn,text="Quit",bg='#f7f1e3', fg='black', command=wn.destroy)


Quit.place(relx=0.55,rely=0.9, relwidth=0.18,relheight=0.08)

wn.mainloop()

#Creating the mail window


wn = tkinter.Tk()
wn.title("Agent77's Showroom")
wn.configure(bg='honeydew2')
wn.minsize(width=500,height=500)
wn.geometry("700x600")

headingFrame1 = Frame(wn,bg="snow3",bd=5)
headingFrame1.place(relx=0.2,rely=0.1,relwidth=0.6,relheight=0.16)
headingLabel = Label(headingFrame1, text="Welcome to Agent 77's Showroom",
fg='grey19', font=('Courier',15,'bold'))
headingLabel.place(relx=0,rely=0, relwidth=1, relheight=1)

#Button to add a new product


btn1 = Button(wn,text="Add a Car in record",bg='LightBlue1', fg='black',
width=20,height=2, command=addProd)
btn1['font'] = font.Font( size=12)
btn1.place(x=270,y=175)

#Button to delete a product


btn2 = Button(wn,text="Remove a record",bg='misty rose',
fg='black',width=20,height=2,command=delProd)
btn2['font'] = font.Font( size=12)
btn2.place(x=270,y=255)

#Button to view all products


btn3 = Button(wn,text="View Models",bg='old lace',
fg='black',width=20,height=2,command=viewProds)
btn3['font'] = font.Font( size=12)
btn3.place(x=270,y=335)

#Button to add a new sale and generate bill


btn4 = Button(wn,text="New Buyer",bg='lavender blush2', fg='black',
width=20,height=2,command = newCust)
btn4['font'] = font.Font( size=12)
btn4.place(x=270,y=415)

wn.mainloop()
OUTPUT SCREEN
REQUIREMENTS
->Operating systems- Windows:8, 10 & 11 or

Mac OS: Big sur, Monterey & Ventura

->Processor- Intel core –9th ,10th ,11th ,12th gen

Ryzen – 2000, 3000, 4000, 5000,6000 series

Apple – M1, M2

->RAM- 8 Gb

->Hard disk space- min. 1gb (if possible then prefer SSD)

->Software - Python 3.10.6, VS Code 1.70


BIBLOGRAPHY
VS code: https://code.visualstudio.com/download

Python: https://www.python.org/downloads/

Or

https://apps.microsoft.com/store/detail/python-310/9PJPW5LDXLZ5

Windows powershell:
https://apps.microsoft.com/store/detail/powershell/9MZ1SNWT0N5D?hl=en-
in&gl=in

Tkinter: https://docs.python.org/3/library/tkinter.html

My SQL connector: https://www.geeksforgeeks.org/mysql-connector-python-


module-in-python/

Python Geeks: https://projectsgeek.com/2016/01/online-vehicle-showroom-


project.html

Info about modules: www.python.org

SDLC model: https://www.geeksforgeeks.org/software-development-life-cycle-


sdlc/

You might also like