0 ratings0% found this document useful (0 votes) 41 views20 pagesComputer Science Project
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here.
Available Formats
Download as PDF or read online on Scribd
CAR SHOWROOM
MANAGEMENT
SYSTEM
A PROJECT WORK IN COMPUTER SCIENCE
SUBMITTED BY
Arun KrishnaMe,
_—_—
—————
—S———— =
ae EY STOTT
ota fener Wrst
We
This is certified to be the bonafide project work of Arun
Krishna of Class XII in the subject of COMPUTER SCIENCE
done in the COMPUTER SCIENCE laboratory of PM SHRI
Kendriya Vidyalaya Thrissur during the academic year 2024-
25.
Teacher In Charge
PRINCIPAL
External Examiner :
Date: 8-11-2024INDEX
NePOorye rope»
Abstract
System Configuration
Python as Front End
MySQL as Back End
Advantage of computerization
System Design
Working Logic of the system
Database design
Code
Input /Output screen
ConclusionABSTRACT
This project aims at developing a software application for
managing Car details. It allows user to store the details of
cars in a database. It also allows manipulations on the car
details like editing, deleting etc.
The application has 2 users : One user having the
administrative control and another user having limited
control.SYSTEM CONFIGURATION
HARDWARE
Processor :AMD Ryzen 7 PRO 2700 Eight-Core Processor
Memory : 8 GB RAM
System type : 64 bit OS
SOFTWARE
Operating System : Windows 11
Programming Language : Python 3.12
Storagetype :Database(MySQL)Python as Front End
Thetermfront-end” refers to the user interface. Python is used as
Front End interface in this project
Python is a computer programming language o en used to build websites and
so ware, automate tasks, and conduct data analysis. Python is a
general-purpose language, meaning it can be used to create a variety of different
programs and isn’t specialized for any specific problems. This versatility, along
with its beginner-friendliness, has made it one of the most-used programming
languages today.
Python can be used for:
@ — Dataanalysisandmachinelearning
Webdevelopment
Automationorscripting
So waretestingandprototyping
Everydaytasks
@ —Pythonisinterpreted- Python is processed at runtime by the
interpreter. You do not need to compile your program before
executing It. This is similar to PERL and PHP.
@ —Pythonisinteractive- You can actually sit at a Python prompt
and interact with the interpreter directly to write your programs.
@ Python is Object-Oriented - Python supports Object-Oriented
style or technique of programming that encapsulates code within
objects,
@ _ PythonisaBeginner'sLanguage -Pythonisagreatlanguagefor
the beginner-level programmers and supports the development of a wide
range of applications from simple text processing to WWW browsers to
gamesMySQL as Back End
The back end refers to parts of a computer application or a program's coc
that allow it to operate and that cannot be accessed by a user. Most data
and operating syntax are stored and accessed in the back end ofa
computer system. Typically the code is comprised of one or more
programming languages.
Every software application will have a database software at the back end
MySQL is used as a back end for storing data in this project.
@ —_ MySQLisadatabasesystemusedfordevelopingweb-basedsoftware
applications.
MySQLusedforbothsmallandlargeapplications.
MySQLisarelationaldatabasemanagementsystem (RDBMS).
MySQLisfast,reliable,andflexivleandeasytouse.
MySQLsupportsstandardSQL (StructuredQueryLanguage).
MySQLisfreetodownloadanduse.
MySQLwasdevelopedbyMichaelWideniusandDavidAxmarkin1994,
MySQLispresentlydeveloped,distributed,andsupportedoyOracle
Corporation.
@ — MySQLWritteninc,c++ADVANTAGE OF COMPUTERIZATION
In the present scenario, majority of the task done manually
are computerized. The car details of a showroom was being
maintained in the form of registers.Writing and maintaining
these registers was a difficult task.
Computerising this work has lot of advantages:
1. Thedetailscanbesharedofthenetworkandmade
available to customers and car dealers.
2. Multiplecopiesneednotbemaintainedbyeachuser
3. Thedataavailablewillbereliableandaccurate
4. Anytypeofreportscanbegeneratedveryfastfromthe
dataWorking logic of the system
The application has 2 users :Car dealer and
Customer. car dealer has passwords and can enter the
application after password verification.
The Company Dealers are considered as the
administrator of the application. This user is given the rights
for showing and searching the car details. The data is saved
in table ‘Cars’. Reports like Brand,Model,Type,Price,Mileage
Rating are available here.
The Car dealer has most of the privileges of the
administrator. The dealer can insert,delete and update the
car details by entering the password.
The customers can view details of cars and search the car
they want.Data base design
Tables used in the project
TABLE 1: CARS
Python Code of Project
import mysql.connector as sql
conobj=sql.connect(host="localhost",user="root", passwd=
admin",database="diopta_showroom")
if conobj.is_connected():
print("connected")
else:
print("Not connected")cursor=conobj.cursor()
def showcars():
print("Inside function")
try:
q="select * from cars"
cursor.execute(q)
print("Query executed")
rs=cursor.fetchall()
for iin rs:
print(i)
except:
print("could not find table")
def insertcars():
try:
sl_no=int(input("Enter the serial number"))
br=input("Enter brand")
mo=input("Enter model")
pr=float(input("Enter price"))
ty=input("Enter type")
mi=int(input("Enter milage"))ra=float(input("Enter rating"))
q="insert into cars values(%s,%s,%s,%s,%s,%s,%s)"
v=(sl_no,br,mo,pr,ty,mi,ra)
cursor.execute(q,v)
conobj.commit()
print("Record inserted")
except:
print("could not find the table")
def updatecars():
n=int(input("enter sl no"))
q="select*from cars where sl_no={}".format(n)
try:
cursor.execute(q)
rs=cursor.fetchall()
if cursor.rowcount==0:
print("record not found")
else:
br=input("Enter new brand")
mo=input("Enter new model")
pr=int(input("Enter new price"))ty=input("Enter new type")
mi=int(input("Enter new milage"))
ra=float(input("Enter new rating"))
q="update cars set
brand='{}',model='{}',price={},type='{}', mileage={},rating={}
where sl_no={}".format(br,mo,pr,ty,mi,ra,n)
cursor.execute(q)
conobj.commit()
print("record updated")
except:
print("Record not found")
def deletecars():
try:
cno=int(input("enter sl no to delete"))
q="delete from cars where s|_no=%s"
r=(cno,)
cursor.execute(q,r)
conobj.commit()
print("record deleted")
except:print("could not find table")
cursor.close()
conobj.close()
def searchcars():
print("inside function")
try:
model=input("enter model to search")
q="select * from cars where model =%s"
v=(model,)
cursor.execute(q,v)
print("query executed")
rs=cursor.fetchall()
cnt=cursor.rowcount
print(cnt)
if cnt==0:
print("record not found")
else:
for iin rs:
print(i)
except:print("could not find table")
cursor.close()
conobj.close()
print("1 : SHOWCARS")
print("2 : INSERTCARS")
print("3 : UPDATECARS")
print("4 : DELETECARS")
print("5 : searchCARS")
print("6 : EXIT")
while True:
print("WELCOME TO DIOPTA SHOWROOM")
ch=int(input("Enter your choice"))
if ch==1:
showcars()
elif ch==2:
p=input("Enter password")
if str(p) ‘dioptacar"):
insertcars()
else:print("Wrong password")
elif ch==3:
p=input("Enter password")
if str(p)
‘dioptacar"):
updatecars()
else:
print("Wrong password")
elif ch==4:
p=input("Enter password")
if str(p)==("dioptacar"):
deletecars()
else:
print("Wrong password")
elif ch==5:
searchcars()F
elif ch==6:
print("Exiting...
break
else:
print("invalid input")INPUT/OUTPUT SCREENS
Nes
INSERT ©
Nie
DELETE CARWELCOME TO DIOPTA SHOWROOM
your choice2
passworddioptacar
uel 1a We LOLs) -19yd
brandMCLaren
Ui fele [=a Pd- hs)
fe) ap Rots) ]-12]212)
Enter typeRacing
[ane-Tamm MT =—83)
Enter rating4.6
Record inserted
AG
Pes Ure eee)CONCLUSION
We have completed the project according our aim. We have
tested all the menus with different data and found that all
tasks are executed successfully.
Additional functionalities can be added to improve the
project. We could learn more about python libraries, mysql
and interface of python and mysql
We have referred internet and different python text books
for knowing more about Python. We also referred various
websites to get help.
FRI