Professional Documents
Culture Documents
On Car Sales System: Mini Project Report
On Car Sales System: Mini Project Report
On Car Sales System: Mini Project Report
On
VISHNU.CS
(Reg. No.17130248)
March 2019
Department of Computer Engineering
VISHNU.C.S
March 2019
KERELA
CERTIFICATE
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 thank almighty God, my parents and friends for their constant encouragement
without which this project would not be possible.
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
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.
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
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
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.
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
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
RFLOOR Integer
RBEDS Integer
RCOAST Integer
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.
5.SOURCECODE
1.LOGIN
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");
Statement st=con.createStatement();
System.out.println(sh);
ResultSet c=st.executeQuery(sh);
if(c.next())
this.setVisible(false);
new details().setVisible(true);
else
this.setVisible(false);
new ADMINLOGIN().setVisible(true);
r.setVisible(true);
java.awt.EventQueue.invokeLater(() -> {
new LOGIN().setVisible(true);
});
2 ADMIN LOGIN
try {
String frome = this.from.getText();
String too = this.to.getSelectedItem().toString();
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");
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);
}
} catch (ClassNotFoundException ex) {
Logger.getLogger(adminflights.class.getName()).log(Level.SEVERE, null, ex);
}
3.BOOKING
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);
}
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);
System.out.println(db);
System.out.println(artym);
System.out.println(deptt);
System.out.println(pri);
System.out.println(dat);
System.out.println(set);
4. ADMIN LOGIN
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();
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);
new home().setVisible(true);
}
5. EDIT FLIGHT DETAILS
//updation
try{
//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);
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
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
try {
String name=jTextField1.getText();
String email=jTextField2.getText();
String pasword=jPasswordField3.getText();
Class.forName("com.mysql.jdbc.Driver");
Connection
con=DriverManager.getConnection("jdbc:mysql://localhost/airlin
e","root","mysql");
Statement st=con.createStatement();
int c=0;
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");
Logger.getLogger(register.class.getName()).log(Level.SE
VERE, null, ex);
Logger.getLogger(register.class.getName()).log(Level.SE
VERE, null, ex);
8.DELETE STAFFS
try {
String c_name = jTextField1.getText();
Class.forName("com.mysql.jdbc.Driver");
Connection con
=DriverManager.getConnection("jdbc:mysql://localhost/airline","root","mysql");
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);
}
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.
7. BIBLOGRAPHY
1. Java online guides from java.org
2. Stack overflow
3. Tutorials point
4. Google.in
5. Wikipedia