On Car Sales System: Mini Project Report

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 41

CAR SALES SYSTEM PAGE NO.

MINI PROJECT REPORT

On

CAR SALES SYSTEM


Submitted by

VISHNU.CS

(Reg. No.17130248)

In partial fulfillment of the requirements for the


award of
Diploma in
Computer Engineering

March 2019
Department of Computer Engineering

DEPARTMENT OF COMPUTER ENGINEERING GPTC KALAMASHERY


CAR SALES SYSTEM PAGE NO. 2

GOVT. POLYTECHNIC COLLEGE, KALAMASSERY


KERALA

MINI PROJECT REPORT


ON
CAR SALES SYSTEM
Submitted by

VISHNU.C.S

(Reg. NO. 17130481)

In partial fulfillment of the requirements of the award of the

Diploma in Computer Engineering

March 2019

Department of Computer Engineering

GOVT. POLYTECHNIC COLLEGE, KALAMASSERY

KERELA

Department of Computer Engineering

DEPARTMENT OF COMPUTER ENGINEERING GPTC KALAMASHERY


CAR SALES SYSTEM PAGE NO. 3

CERTIFICATE

This is to certify that this Mini Project Report Titled hostel


management systemwas submitted by Vishnu.c.s with Reg.
No.17130248 is a Student of Fourth Semester Computer
Engineering, Government Polytechnic College Kalamassery in partial
fulfillment of the requirement for the award of Diploma in Computer
Engineering under the Board of Technical Education, during 2018-19.

Lecturer Head of the Department

Internal Examiner External Examiner

DEPARTMENT OF COMPUTER ENGINEERING GPTC KALAMASHERY


CAR SALES SYSTEM PAGE NO. 4

ACKNOWLEDGEMENTS

I would like to take this opportunity to express my profound gratitude and deep
regards to my guide Sree Deepak Antony and SreemathySoumya K S miss for their
exemplary guidance, monitoring and constant encouragement throughout the course of
this thesis. The blessings, help and guidance given by him time to time shall carry me a
long way in the journey of life on which I am about to embark.

I would also take this opportunity to express a deep sense of gratitude to our Head
of the Department, SreeChandrakumar and our class tutor, SreemathySajeena for their
cordial support, valuable information and guidance which helped me in completing this
task through various stages.

I am thankful and fortune enough to get constant encouragement, support and


guidance from all teaching staff of department of computer engineering which helped me
in successfully completing my project work. I would also like to extend my sincere
gratitude to all non-teaching staff of our department for their timely support.

I thank almighty God, my parents and friends for their constant encouragement
without which this project would not be possible.

DEPARTMENT OF COMPUTER ENGINEERING GPTC KALAMASHERY


CAR SALES SYSTEM PAGE NO. 5

TABLE OF CONTENTS

1. ABSTRACT 6
2. INTRODUCTION 7

3. REQUIREMENT ANALYSIS 8

4. DESIGN 9
3.1.DATABASE 9
5. SOFTWARE TOOLS USED 12

6. SOURCE CODE 13
7. CONCLUSION 33
8. BIBILOGRAPHY 34

DEPARTMENT OF COMPUTER ENGINEERING GPTC KALAMASHERY


CAR SALES SYSTEM PAGE NO. 6

ABSTRACT

Now we have Hostel management system around us. We have large numbers of them
even at our smart phones. All of them can be used manually by ourselves. This is simple
project for hostel management system. The purpose of the project is to build and
application program to reduce the manual work for managing hostel admissions and
rooms for hostelers

This application is an application that enables a user to see the details of rooms and
students. The project provide details facilities based on various factor such as number of
rooms,details of registered students.

The hostel management system is an application that computerize the registration and
managing of hostel . This window based on application.this helps in managing data
related to rooms and students who register in the application.

DEPARTMENT OF COMPUTER ENGINEERING GPTC KALAMASHERY


CAR SALES SYSTEM PAGE NO. 7

1. INTRODUCTION

The hostel management system is developed in favour of hostel management team which
helps them to save the records of the students about their rooms and other things.it helps
them them from the manual work from which it is difficult to find the record of the
students and the information about those ones who has left the hostel years before.

Through this application they cannot require efficient person to handle and manage
the affairs of the students in the hostel ,all you need is to log in as administrator and you
can see the information of all the students who have obtained and registered their hostel
from,click them to the available hpostel.

2. REQIREMENTS ANALYSIS

The existing application is more complex. Which require more time and complex
and high chances of making errors. It’s also complex to manage the customer’s needs

DEPARTMENT OF COMPUTER ENGINEERING GPTC KALAMASHERY


CAR SALES SYSTEM PAGE NO. 8

with a single employee. The system on mobile phones are also not good becauseof our
lack of experiences in booking hostels. The chance of having errors and making mistakes
are high when using mobile apps. There is other chances of errors made by human
faultsbecause of we are not having an experienced man’s instructions.

This application covers all the complexity of performing the tasks that the
currentsystem and the mobile applications are having now.It is not complex because it is
simple and is used by an experienced employee. The application will help you in the
hostel booking procedures.. The assistance of the employer decrease manual errors that
could easily happen while using mobile applications. It is also faster and secure.

It has its own security which only allow the admin and stattf with a password and a
username preventing any other person to access to the data.

3. DESIGN

The application is designed as a multiple user application users are created and
deleted by administrators. The password and the username is stored in the source code of
the program directly. There are total of 15 screens including a login. The admin login and

DEPARTMENT OF COMPUTER ENGINEERING GPTC KALAMASHERY


CAR SALES SYSTEM PAGE NO. 9

staff login are on the home page. Through the staff login staffs search for a flight to
book,and he can book delete booking. Through admin login you can manage rest of the
settings like creating and editing staffs, updating flight details etc. He also see staff list
and flight list.

STUDENT LOGIN ADMIN LOGIN

 User details  Student management


 Room details  Student information
 Room details
 Adding new room

3.1. DATABASE

The backend of the application is done by using DBMS. It will be act as the
backend. There will be tables to hold the records of the member chitti schemes and other
data like income.

TABLES

1. REGISTRATION
Attributes Data type Key
NAME Varchar Primary key

DEPARTMENT OF COMPUTER ENGINEERING GPTC KALAMASHERY


CAR SALES SYSTEM PAGE NO. 10

ROOM NO Integer
MOBILE Varchar Foreign key

EMAIL VarChar
GENDER Varchar
ADDRESS Varchar
CITY Integer
STATE Varchar
COUNTRY Varchar
PASSWORD Varchar
ID Integer
2. ROOM
Attributes Data type Key

RNO Varchar Foreign key

RTYPE Varchar Primary key

RFLOOR Integer

RBEDS Integer

RCOAST Integer

4. SOFTWARE TOOLS USED


1. Netbeans IDE 8.1

DEPARTMENT OF COMPUTER ENGINEERING GPTC KALAMASHERY


CAR SALES SYSTEM PAGE NO. 11

NetBeans is an integrated development environment (IDE) for Java. NetBeans


allows applications to be developed from a set of modular software components
called modules. NetBeans runs on Windows, macOS, Linux and Solaris. In
addition to Java development, it has extensions for other languages like PHP, C,
C++, HTML5,and JavaScript. Applications based on NetBeans, including the
NetBeans IDE, can be extended by third party developers.

2. JDK

The Java Development Kit (JDK) is an implementation of either one of the Java
Platform, Standard Edition, Java Platform, Enterprise Edition, or Java Platform,
Micro Edition platforms released by Oracle Corporation in the form of a binary
product aimed at Java developers on Solaris, Linux, macOS or Windows. The JDK
includes a private JVM and a few other resources to finish the development of a
Java Application. Since the introduction of the Java platform, it has been by far the
most widely used Software Development Kit (SDK).[citation needed] On 17
November 2006, Sun announced that they would release it under the GNU General
Public License (GPL), thus making it free software. This happened in large part on
8 May 2007, when Sun contributed the source code to the OpenJDK.

3. Phpmyadmin (DataBase)

phpMyAdmin is a free and open source administration tool for MySQL and
MariaDB. As a portable web application written primarily in PHP, it has become
one of the most popular MySQL administration tools, especially for web hosting
services.

DEPARTMENT OF COMPUTER ENGINEERING GPTC KALAMASHERY


AIRLINE TICKETS RESERVATION PAGE NO.
12

5.SOURCECODE
1.LOGIN

DEPARTMENT OF COMPUTER ENGINEERING GPTC KALAMASHERY


AIRLINE TICKETS RESERVATION PAGE NO.
13

//when log in button pressed

private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {

try {

String u=ud.getText();

String n=pass.getText();

Class.forName("com.mysql.jdbc.Driver");

Connection con=
DriverManager.getConnection("jdbc:mysql://localhost/car","root","mysql");

DEPARTMENT OF COMPUTER ENGINEERING GPTC KALAMASHERY


AIRLINE TICKETS RESERVATION PAGE NO.
14

Statement st=con.createStatement();

String sh="select * from user where USER_ID='"+u+"' and


PASSWORD='"+n+"'";

System.out.println(sh);

ResultSet c=st.executeQuery(sh);

if(c.next())

this.setVisible(false);

JOptionPane.showMessageDialog(null, "PASSWORD ARE MATCHING");

new details().setVisible(true);

else

JOptionPane.showMessageDialog(null, "PASSWORDS ARE NOT


MATCHING");

} catch (ClassNotFoundException | SQLException ex) {

Logger.getLogger(login.class.getName()).log(Level.SEVERE, null, ex);

DEPARTMENT OF COMPUTER ENGINEERING GPTC KALAMASHERY


AIRLINE TICKETS RESERVATION PAGE NO.
15

//when admin login pressed

private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {

this.setVisible(false);

new ADMINLOGIN().setVisible(true);

private void jButton4ActionPerformed(java.awt.event.ActionEvent evt) {

registration r = new registration();

DEPARTMENT OF COMPUTER ENGINEERING GPTC KALAMASHERY


AIRLINE TICKETS RESERVATION PAGE NO.
16

r.setVisible(true);

private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {

public static void main(String args[]) {

java.awt.EventQueue.invokeLater(() -> {

new LOGIN().setVisible(true);

});

2 ADMIN LOGIN

DEPARTMENT OF COMPUTER ENGINEERING GPTC KALAMASHERY


AIRLINE TICKETS RESERVATION PAGE NO.
17

DEPARTMENT OF COMPUTER ENGINEERING GPTC KALAMASHERY


AIRLINE TICKETS RESERVATION PAGE NO.
18

try {
String frome = this.from.getText();
String too = this.to.getSelectedItem().toString();

DEPARTMENT OF COMPUTER ENGINEERING GPTC KALAMASHERY


AIRLINE TICKETS RESERVATION PAGE NO.
19

Class.forName("com.mysql.jdbc.Driver");
Connection con = null;
try {
con =
DriverManager.getConnection("jdbc:mysql://localhost/airline","root","mysql");
} catch (SQLException ex) {
Logger.getLogger(adminflights.class.getName()).log(Level.SEVERE, null, ex);
}
Statement st = null;
try {
st = con.createStatement();
} catch (SQLException ex) {
Logger.getLogger(adminflights.class.getName()).log(Level.SEVERE, null, ex);
}
ResultSet rs = null;
try {
rs = st.executeQuery("select * from allflight where frome ='"+frome+"' and
too='"+too+"'");
} catch (SQLException ex) {
Logger.getLogger(adminflights.class.getName()).log(Level.SEVERE, null, ex);
}
DefaultTableModel model=new DefaultTableModel();
jTable1.setModel(model);

model.addColumn("no");

DEPARTMENT OF COMPUTER ENGINEERING GPTC KALAMASHERY


AIRLINE TICKETS RESERVATION PAGE NO.
20

model.addColumn("fname");
model.addColumn("frome");
model.addColumn("too");
model.addColumn("depttime");
model.addColumn("arvltime");
//model.addColumn("class");
// model.addColumn("price");
model.addColumn("date");
Object[] row=new Object[9];
try {
while(rs.next()){
row[0]=rs.getString("no");
row[1]=rs.getString("fname");
row[2]=rs.getString("frome");
row[3]=rs.getString("too");
row[4]=rs.getString("depttime");
row[5]=rs.getString("arvltime");
// row[6]=rs.getString("class");
// row[7]=rs.getString("price");
row[6]=rs.getString("date");

model.addRow(row);
}
} catch (SQLException ex) {
Logger.getLogger(adminflights.class.getName()).log(Level.SEVERE, null, ex);

DEPARTMENT OF COMPUTER ENGINEERING GPTC KALAMASHERY


AIRLINE TICKETS RESERVATION PAGE NO.
21

}
} catch (ClassNotFoundException ex) {
Logger.getLogger(adminflights.class.getName()).log(Level.SEVERE, null, ex);
}

3.BOOKING

DEPARTMENT OF COMPUTER ENGINEERING GPTC KALAMASHERY


AIRLINE TICKETS RESERVATION PAGE NO.
22

try {
String cname = cn.getText();
String fname = na.getText();
jRadioButton1.setActionCommand("Male");
jRadioButton2.setActionCommand("Female");
jRadioButton3.setActionCommand("Others");
String sex =
buttonGroup1.getSelection().getActionCommand();
int pas = Integer.parseInt(no.getText());
String fro = from.getText();
String too = to.getText();
claas = (String) cls.getSelectedItem();
String db = dated.getText();
String artym = datef.getText();
String deptt = dept.getText();
int pri = Integer.parseInt(pr.getText());
String dat = da.getText();
int set = Integer.parseInt((String)
st.getSelectedItem());

try {
Class.forName("com.mysql.jdbc.Driver");
} catch (ClassNotFoundException ex) {
Logger.getLogger(book.class.getName()).log(
Level.SEVERE, null, ex);

DEPARTMENT OF COMPUTER ENGINEERING GPTC KALAMASHERY


AIRLINE TICKETS RESERVATION PAGE NO.
23

}
Connection con = null;
try {
con =
DriverManager.getConnection("jdbc:mysql://localhost/ai
rline","root","mysql");
} catch (SQLException ex) {
Logger.getLogger(book.class.getName()).log(
Level.SEVERE, null, ex);
}

Statement st=con.createStatement();
int c=0;
c=st.executeUpdate("insert into book
values('"+cname+"','"+fname+"','"+sex+"','"+pas+"','"+fr
o+"','"+too+"','"+claas+"','"+db+"','"+artym+"','"+deptt+"
','"+pri+"','"+dat+"','"+set+"')");
con.close();
if(c>0)

System.out.println(cname);
System.out.println(fname);
System.out.println(sex);
System.out.println(pas);
System.out.println(fro);
System.out.println(too);
System.out.println(claas);

DEPARTMENT OF COMPUTER ENGINEERING GPTC KALAMASHERY


AIRLINE TICKETS RESERVATION PAGE NO.
24

System.out.println(db);
System.out.println(artym);
System.out.println(deptt);
System.out.println(pri);
System.out.println(dat);
System.out.println(set);

// TODO add your handling code here:


} catch (SQLException ex) {
Logger.getLogger(book.class.getName()).log(Le
vel.SEVERE, null, ex);
}
}

4. ADMIN LOGIN

DEPARTMENT OF COMPUTER ENGINEERING GPTC KALAMASHERY


AIRLINE TICKETS RESERVATION PAGE NO.
25

if(jTextField1.equals(""))
JOptionPane.showMessageDialog(null,"enter
name");
else
{
if(jTextField2.equals(""))
JOptionPane.showMessageDialog(null,"ente
r password corresponding to the name");
}
{
name=jTextField1.getText();

DEPARTMENT OF COMPUTER ENGINEERING GPTC KALAMASHERY


AIRLINE TICKETS RESERVATION PAGE NO.
26

pasword=String.valueOf(jTextField2.getText(
));
if("anandu".equals(name) &&
"123456".equals(pasword))
{
ADMIN2 l=new ADMIN2();
l.setVisible(true);
dispose();
JOptionPane.showMessageDialog(null,"login
successfull");
this.setVisible(false);
new ADMIN2().setVisible(true);
}
else
{
JOptionPane.showMessageDialog(null,"log
in failed"
+ ",enter valid name and password");
}
System.out.println(name);
System.out.println(pasword);
} }
private void
jButton3ActionPerformed(java.awt.event.ActionEv
ent evt) {

this.setVisible(false);

DEPARTMENT OF COMPUTER ENGINEERING GPTC KALAMASHERY


AIRLINE TICKETS RESERVATION PAGE NO.
27

new home().setVisible(true);
}
5. EDIT FLIGHT DETAILS

//updation
try{

DEPARTMENT OF COMPUTER ENGINEERING GPTC KALAMASHERY


AIRLINE TICKETS RESERVATION PAGE NO.
28

//int no2=Integer.parseInt(no1.getText());
String no2=(String) jComboBox1.getSelectedItem();
String name=na.getText();
String fro=from.getText();
String t=to.getText();
String depttime=dp.getText();
String arvltime=ar.getText();
String clas=cl.getText();
int price=Integer.parseInt(pr.getText());
String date=da.getText();

Class.forName("com.mysql.jdbc.Driver");
Connection con
=DriverManager.getConnection("jdbc:mysql://localhost/a
irline","root","mysql");
Statement st=con.createStatement();
int rs=st.executeUpdate("delete from allflight where
no="+no2+"");
int s = st.executeUpdate("insert into allflight
values('"+no2+"','"+name+"','"+fro+"','"+t+"','"+depttime
+"','"+arvltime+"','"+clas+"','"+price+"','"+date+"')");
if(s>0){
JOptionPane.showMessageDialog(null,"Updated"
);
System.out.println(no2);

DEPARTMENT OF COMPUTER ENGINEERING GPTC KALAMASHERY


AIRLINE TICKETS RESERVATION PAGE NO.
29

System.out.println(name);
System.out.println(fro);
System.out.println(t);
System.out.println(depttime);
System.out.println(arvltime);
System.out.println(clas);
System.out.println(price);
System.out.println(date);
}
} catch (ClassNotFoundException | SQLException
ex) {
Logger.getLogger(register.class.getName()).log(L
evel.SEVERE,
null, ex);
}

private void
jButton2ActionPerformed(java.awt.event.ActionEvent
evt) {
this.setVisible(false);
new ADMIN2().setVisible(true);
}
//deletion

DEPARTMENT OF COMPUTER ENGINEERING GPTC KALAMASHERY


AIRLINE TICKETS RESERVATION PAGE NO.
30

Try{
Stringno2=(String) jComboBox1.getSelectedItem();

Class.forName("com.mysql.jdbc.Driver");
Connection con
=DriverManager.getConnection("jdbc:mysql://localhost/a
irline","root","mysql");
Statement st=con.createStatement();
int rs=st.executeUpdate("delete from allflight where
no="+no2+"");
int s = 0;

if(s>0){
this.setVisible(false);
JOptionPane.showMessageDialog(null,"deleted");
}
} catch (ClassNotFoundException | SQLException
ex) {
Logger.getLogger(register.class.getName()).log(L
evel.SEVERE,
null, ex);
}

6. CREATE STAFFS

DEPARTMENT OF COMPUTER ENGINEERING GPTC KALAMASHERY


AIRLINE TICKETS RESERVATION PAGE NO.
31

try {

String name=jTextField1.getText();

String email=jTextField2.getText();

String pasword=jPasswordField3.getText();

Class.forName("com.mysql.jdbc.Driver");

DEPARTMENT OF COMPUTER ENGINEERING GPTC KALAMASHERY


AIRLINE TICKETS RESERVATION PAGE NO.
32

Connection
con=DriverManager.getConnection("jdbc:mysql://localhost/airlin
e","root","mysql");

Statement st=con.createStatement();

int c=0;

c=st.executeUpdate("insert into staffs


values('"+name+"','"+email+"','"+pasword+"')");

con.close();

if(c>0)

//this.setVisible(false);

JOptionPane.showMessageDialog(null,"Registration
successfully");

System.out.println(name);

System.out.println(email);

System.out.println(pasword);

else

JOptionPane.showMessageDialog(null,"Registration
failed");

DEPARTMENT OF COMPUTER ENGINEERING GPTC KALAMASHERY


AIRLINE TICKETS RESERVATION PAGE NO.
33

} catch (ClassNotFoundException ex) {

Logger.getLogger(register.class.getName()).log(Level.SE
VERE, null, ex);

} catch (SQLException ex) {

Logger.getLogger(register.class.getName()).log(Level.SE
VERE, null, ex);

8.DELETE STAFFS

DEPARTMENT OF COMPUTER ENGINEERING GPTC KALAMASHERY


AIRLINE TICKETS RESERVATION PAGE NO.
34

try {
String c_name = jTextField1.getText();
Class.forName("com.mysql.jdbc.Driver");
Connection con
=DriverManager.getConnection("jdbc:mysql://localhost/airline","root","mysql");

DEPARTMENT OF COMPUTER ENGINEERING GPTC KALAMASHERY


AIRLINE TICKETS RESERVATION PAGE NO.
35

Statement st=con.createStatement();
int rs = 0;
int dialogButton = JOptionPane.YES_NO_OPTION;
JOptionPane.showConfirmDialog(null,"please confirm delete");
if(dialogButton == JOptionPane.YES_OPTION)
{
rs=st.executeUpdate("delete from staffs where user='"+c_name+"'");
}
if(rs>0)
{
JOptionPane.showMessageDialog(null,"deleted");

}
else
JOptionPane.showMessageDialog(null,"error deleting");
} catch (ClassNotFoundException ex) {
Logger.getLogger(allstaffs.class.getName()).log(Level.SEVERE, null, ex);
} catch (SQLException ex) {
Logger.getLogger(allstaffs.class.getName()).log(Level.SEVERE, null, ex);
}

DEPARTMENT OF COMPUTER ENGINEERING GPTC KALAMASHERY


AIRLINE TICKETS RESERVATION PAGE NO.
36

DEPARTMENT OF COMPUTER ENGINEERING GPTC KALAMASHERY


AIRLINE TICKETS RESERVATION PAGE NO.
37

DEPARTMENT OF COMPUTER ENGINEERING GPTC KALAMASHERY


AIRLINE TICKETS RESERVATION PAGE NO.
38

DEPARTMENT OF COMPUTER ENGINEERING GPTC KALAMASHERY


AIRLINE TICKETS RESERVATION PAGE NO.
39

DEPARTMENT OF COMPUTER ENGINEERING GPTC KALAMASHERY


AIRLINE TICKETS RESERVATION PAGE NO.
40

6. CONCLUTION
The aim of the project was to overcome the existing problems in hostel management
system due to lack of users knowledge of booking hostels. The works are very
complicated and there is a high chance of error when done manually by ourselves.

This project was able to develop an application which helps to reduce the
complexity of the existing system hostel registration. It was able to overcome the
difficulties or disadvantages of the existing system. It also provides a good security to the
data and helps to save time in different instants of performance.

DEPARTMENT OF COMPUTER ENGINEERING GPTC KALAMASHERY


AIRLINE TICKETS RESERVATION PAGE NO.
41

7. BIBLOGRAPHY
1. Java online guides from java.org
2. Stack overflow
3. Tutorials point
4. Google.in
5. Wikipedia

DEPARTMENT OF COMPUTER ENGINEERING GPTC KALAMASHERY

You might also like