Professional Documents
Culture Documents
PROJECT REPORT
ON
1
2
CONTENTS
3
Bibliography 127
4
ACKNOWLEDGEMENT
We would like to take this opportunity to express our gratitude towards all the people
who have in various ways, helped in the successful completion of our project.
We must convey our gratitude to Mr. Pramod Sharma for giving us the constant
source of inspiration and help in preparing the project, personally correcting our work
and providing encouragement throughout the project.
We also thank all our faculties members for steering us through the tough as well as
easy phases of the project in a result oriented manner with concern attention.
DATE
5
DECLARATION
6
INTRODUCTION
One must know what the problem is before it can be solved as necessary is the mother
of invention & of course, if we dont know where to go, we will not know when we will
have reached there. The basis for a candidate system is recognition of a need for
improving an information system or a procedure. This need leads to a preliminary
survey or an initial investigation. It entails looking into the duplication of efforts,
inefficient existing procedures etc.
The main problem in the Roadways managemet System is to handle the daily bus time
table. There are two basic processes that are bus and staff are used in this project. In
addition to these two processes, records have to be maintained about bus, staff
members, bus time table, daily expenses. In manual process consume lots of time to
complete the purchasing and selling process. The solution of this is to automate the
processes of bus time table
7
Scope of the system :
1. To provide security as only an authorized employee can interact with the system.
2. To help the staff in working easily and efficiently.
3. To help the staff in reducing errors that are encountered frequently during
manual operations by concurrently updating the data stored in many places.
4. To reduce the workload on the staff by providing automatic calculation.
5. To help the staff or manager in tracing the transaction quickly.
6. To help the staff in generating various reports at various nick of time as per their
requirements e.g. daily, weekly, monthly or annually.
7. To reduce the manpower.
8. To maintain the data with complete consistency and minimum redundancy.
One must know what the problem is before it can be solved as necessary is the mother
of invention & of course, if we dont know where to go, we will not know when we will
have reached there. The basis for a candidate system is recognition of a need for
improving an information system or a procedure. This need leads to a preliminary
survey or an initial investigation. It entails looking into the duplication of efforts,
inefficient existing procedures etc.
The main problem in the Roadways managemet System is to handle the daily bus time
table. There are two basic processes that are bus and staff are used in this project. In
addition to these two processes, records have to be maintained about bus, staff
members, bus time table, daily expenses. In manual process consume lots of time to
complete the purchasing and selling process. The solution of this is to automate the
processes of bus time table
8
2. To help the company staff in providing better service to the student and staff
members in a Reasonable time i.e. to process their requests quickly without wasting
time in Forming long queues by students to get their job done.
3. To reduce the load of work on the company staff by providing automatic generation
of the reports etc.
4. To help the company staff in generating reports about students and staff as well.
5. To help the company staff in reducing errors that is encountered frequently during
manual operations.
6. To provide security as only an authorized user can interact with the system.
During the implementation phase debugging, documentation of the system was created
out, module in the project for
Accuracy of Results,
Minimization of response Time,
Clarity and Simplicity of the code,
Minimization of hard Coding i.e. (a generic approach was followed)
Minimization of amount of memory used.
Various types of errors were discovered while debugging the modules. These ranged
from errors to failure to account for various processing cases. Proper documentation of
each module was done by embedding comments in the executable portion of the code.
To enhance the readability, comments, indentation, parenthesis, block spaces, blank
lines and borders were around the blocks of comments. Care was taken to use
9
descriptive names for table, field modules, forms etc. The proper use of indentation,
parenthesis and blank lines was also ensured during coding.
Testing of the report Generation module was carried out to find out the response time of
the system for the generating reports. To make the response time negligible.
The purpose of this project is to convey the requirements of the project (as specified by
the client) to the programmers to ensure that the programmers understand and fulfill the
requirements to the expectation of the client.
Secondly, this project is used to ensure that the development team understands the
requirements specified by the client. This document will act as the contract for all future
development; all development spawns from and adheres to the details in the
requirements. The SRS also outlines the performance requirements that may be set and
required by the client/user.
10
PROJECT CATEGORY TOOLS & ENVIRONMENT
To do this work manually requires a lot of manpower and consumes too much time.
Moreover one is never sure about the efficiency & accuracy of work being done and
records being maintained. A bad part of this style of working is that, if a person
concerned for a particular job, say maintaining supplier record, is on leave, some of the
process gets standstill, which depends on the records kept by that employee. That is,
where automation comes in to help and allows simple, smooth and most efficient,
secure and easy to handle functionality.
This system will reduce the workload of the employee and time of processing of data
from one unit to another. It also will help the staff/manager in tracing the daily
transaction like purchasing of raw materials & selling edibles to customer to maintain
staff record, asset information to reduce the manpower. It also provides the facility to
prevent the unauthorized data access of other persons by categorized the user as normal
user and administrator. Only administrator can delete & even modify the records.
This system will prove to be master key to manage of a supermarket. Now days all the
organizations are converting from manual to computerized transactions. This provides
better services to the employees with less effort thus increasing the demand of this type
of system day by day.
This project ROADWAYS MANAGEMENT SYSTEM will help the staff & stands
at their command in every sphere of their activities regarding a Customer booking. It
will be always their back & call.
11
FRONT END
JAVA NETBEANS developed by Sun Microsystems Company. JAVA can use a large
number of reference libraries and components. Java the environment-provides
integration with a variety of other tools, including source code management, component
reuse tools and data manipulation. Java truly is much more of a programming
environment than just a language. using this environment ,a single developer can
quickly create a simple application; a team of developers can create a so sophisticated,
distributed application.
Data access
Internet features
Controls
Component creation
Language
Wizards
As system becomes more complex and distributed, no single tool can address all of the
needs of the system. Java provides the development environments with the raw tools
needed to build small systems well as components of large system.
If we look at all of the new features and functions added to the 6.0 release of the Java, a
couple of themes become evident: the internet and the database
12
BACK END
For example, suppose the phone numbers of your suppliers are stored in various
locations: in a card file containing supplier phone numbers, in product information file
cabinet, and in a spreadsheet containing order information .if a suppliers phone number
changes, you might have to update that information in all three places in database,
however, you only have to update that information in one place- the suppliers phone
number is automatically updated wherever you use it in database.
Using Microsoft Access, you can manage all your information from a single database
file. Within the file, you can use:
13
2.3 Sotfware and Hardware Requirement
14
PROJECT DEVELOPMENT STAGE
System Analysis stages down the broad frame work of strategy stage into its minute
details. This is the stage where intensive user interaction assumes a lot of importance.
It is also a major point when we develop software. We also consider about time, how
much time software place to complete because for a big organization time factor is
money for full successful of the software also Tax some times so we have consider from
starting to last that means beginning to software.
Economical
Technical
Duration
3.2.1 Economical:-
This study about the software basically give the suggestion like if we develop software
for our organization than how much it will forfeitable, workable as well as economical.
If we developing a software which very economical but not profitable there it is also
wrong decision. So for we economical study about the system table following of the
point.
15
What are the advantages in c0ompression manual we check
whether it is time or not?
Whether it is use friendly or not?
It is mountable for long term.
Understanding about the software
Corrective of software.
3.2.2 Technical:-
We also consider some technical points about development of software.
We see whether the software is reliable or not.
Whether it is work time for long time or not.
What are the languages as well as OS is used for development of software.
It provides security or not.
Software is reusable or not.
Software is updated or not.
Software is flexible or not whether software can maintain.
3.2.3 Duration:-
It is also a major point when we develop software. We also consider about time, how
much time software place to complete because for a big organization time factor is
money for full successful of the software also Tax some times so we have consider from
starting to last that means beginning to software.
Systems analysis is the process of gathering and interpreting facts, diagnosis problems
and using the information to recommend improvement to the system.In brief, we can
say that analysis specifies what the system should do.
16
I. System analysis is conducted with the following objectives in mind:
II. Identify the Student and Staff members need
III. Evaluate the system concept for feasibility
IV. Perform economic and technical analysis
V. Allocate function to hardware,software, people, database and other system
elements
VI. Establish cost and schedule constraints
Create a system definition that forms the foundation for all subsequent engeneering
17
18
List of Tables:
Login table
Bustable
Stafftable
Timetable
1. Login table
Field Name Data Type
Login name Text
Password Text
2. Staff Table
Field Name Data Type
Staffid Number
S_Name Text
ADDRESS Text
PHONE Text
19
Time Table
Sno Number
Busno Text
Regno Text
Fuel Text
staffid1 Number
Staffname 1 Text
Address 1 Text
Contact no 1 Number
Staff id 2 Number
Staff name2 Text
Address 2 Text
`contact no2 Number
Arrival time Text
Departure time Text
Station from Text
Viastation Text
20
21
3.3.1 DATA FLOW DIAGRAM:
A Data Flow Diagram (DFD) is a graphical tool used to describe and analyze the
movement of data through a system - manual or automated including the processes,
stores of data and delays in the system. They are central tools and the basis from which
other components are developed. It depicts the transformation of data, independent of
the physical components, from input to output through logical processes and the
interaction between processes.
DFDs are an excellent mechanism of communicating with the customers and are
widely used for representing external and top-level internal design specification. In the
later situations, DFDs are quite valuable for establishing naming conventions and
names of system components such as subsystems, files and data links.
In a DFD there are four components:
Sources or Destinations of data such as human, entities that interact with system,
outside the system boundary, who form the source and the recipient of information are
depicted in the form of a closed rectangle.
Data flow is a packet of data. It identifies data flow. It is a pipeline through which
information flows. It is depicted in DFD as an arrow with the pointer pointing in the
direction of flow. This connecting symbol connects an entity, process and data stores.
This arrow mark also specifies the sender and the receiver.
Process depicts procedure, function or module that transforms input data into output
data. It is represented as a circle or a bubble with the procedure name and a unique
number inside the circle.
Data stores are the physical areas in the computers hard disk where groups of related
data are stored in the form of files. They are depicted as an open-ended rectangle. The
Data store is used either for storing data into the files or for reference purposes.
22
DFD FOR USER LOGIN
1 User_id
USER
Accessing User
Information
Invalid Pasword
Validity
Process
Process
User Type
Invalid User Type
Validity
Process
Matched
23
DFD OF BUSES
t BUSES
Vehicle data being processed
Data Validity
Process
1 Vehicle1
Invalid Vehicle
data
2 Vehicle2
24
DFD FOR DRIVER
DRIVER
1 DRIVER LIST
Searching Driver
data
Invalid Driver
Display
Valid Driver for
o
display
Pr
25
DFD FOR TIME TABLE
BUSES
1 List of buses
Bus Data
Searching available
Vehicle
Invalid Bus no
Time sarrangement
Valid Bus no
26
27
3.3.2 ENTITY RELATIONSHIP DIAGRAM
The entity relationship (E R) data model is based on a perception of a real world that
consists of a collection of basic objects, called entities, and of relationships among these
objects. An entity is a thing or objects in the real world that is distinguishable from other
objects. Entities are described in database by a set of attributes.
A relationship is an association among several entities. The set of all entities of the same
type and the set of all relationships of the same type are termed as entity set and
relationship set, respectively.
Lines, which link attributes to entity sets and entity sets to relationships.
28
NAME ADDRESS
FUEL RENT
Orderno. COMPANY
PHONE NAME
REG.NO
DRIVER
BUS
DID
VNO
COLOR
contains
has
TIME
ARRANGEMENT
STATION FROM
BUS NO
TIME TABLE
STATION TO
TIME
DID
VIA STATION
29
3.5 System Development:-
Development Phase, translates a set of requirements into an operational system that we
call Software. At early stages of hardware development a hardware engineer does
not reach for a soldering iron, similarly the Software engineer
should not reach the compiler. Design is accomplished first.
The first phase of development concentrates on design. The design phase for
software with a description of architecture and data design. That is a modular structure
is developed first, interfaces are defined and data structure is established. Design criteria
are used for the assessment of quality. This preliminary design step is reviewed for
Procedural aspects of each modular component of the software design are considered
next, and is following by the CODING the generation of program using an appropriate
programming language or CASE tool occurs after the design is complete. Software
reviewed for style and clarity, but should otherwise be directly traceable to a detailed
design description.
During the implementation phase debugging, documentation of the system was created
out, module in the project for
Accuracy of Results,
Minimization of response Time,
30
Clarity and Simplicity of the code,
Minimization of hard Coding i.e. (a generic approach was followed)
Minimization of amount of memory used.
Various types of errors were discovered while debugging the modules. These ranged
from errors to failure to account for various processing cases. Proper documentation of
each module was done by embedding comments in the executable portion of the code.
To enhance the readability, comments, indentation, parenthesis, block spaces, blank
lines and borders were around the blocks of comments. Care was taken to use
descriptive names for table, field modules, forms etc. The proper use of indentation,
parenthesis and blank lines was also ensured during coding.
Testing of the report Generation module was carried out to find out the response time of
the system for the generating reports. To make the response time negligible.
31
32
Login form
33
Splash form
34
Main form
35
Add bus form
36
Delete bus form
37
Modify bus form
38
Search bus form
39
Add staff form
40
Delete staff form
41
Modify staff form
42
Search staff form
43
Set time table form
44
Delete form
45
Modify time table form
46
Search form
47
48
List of bus report
49
List of staff report
50
List of time table report
51
52
Login form
package roadwayess;
import javax.swing.*;
import java.sql.*;
import java.awt.event.*;
else
JOptionPane.showMessageDialog(null, "InCorrect");
{
u.setText("");
p.setText("");
53
u.requestFocus();
if(i==3)
System.exit(0);
}
} catch(Exception e) {
JOptionPane.showMessageDialog(null, e.getMessage());
}
}
try {
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection c=DriverManager.getConnection("jdbc:odbc:road");
Statement state=c.createStatement();
54
else
JOptionPane.showMessageDialog(null,"incorrect");
{
i++;
u.setText("");
p.setText("");
u.requestFocus();
if(i==3)
System.exit(0);
}
} catch(Exception e) {
JOptionPane.showMessageDialog(null,e.getMessage());
}
}
}
55
public static void main(String args[]) {
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new LoginWindow().setVisible(true);
}
});
}
Splash Form
package roadwayess;
import javax.swing.*;
import java.awt.*;
56
public void run() {
new Spleshform().setVisible(true);
}
});
}
Main form
57
Addnewstaff ob=new Addnewstaff();
ob.setVisible(true);
}
ob.setVisible(true);
58
private void jMenuItem12ActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
Modifytimetable ob=new Modifytimetable();
ob.setVisible(true);
}
59
private void jMenuItem17ActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
Listoftimetable ob=new Listoftimetable();
ob.setVisible(true);
}
60
Add bus form
package roadwayess;
import javax.swing.*;
import java.sql.*;
import java.awt.event.*;
int tcno;
String tname,taddress,tphone;
tcno=Integer.parseInt(txtsno.getText());
tname=txtname.getText();
taddress=txtaddress.getText();
tphone=txtphone.getText();
String query;
query="insert into bustable
values("+tcno+",'"+tname+"','"+taddress+"','"+tphone+"')";
state.executeUpdate(query);
JOptionPane.showMessageDialog(null,"Successfully saved");
}catch(Exception e) {
JOptionPane.showMessageDialog(null,"Invalid data or Duplicate sno not
allowed" );
}
}
61
txtphone.setText("");
txtsno.requestFocus();
int pno=0;
try {
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection c=DriverManager.getConnection("jdbc:odbc:road");
Statement state=c.createStatement();
ResultSet res=state.executeQuery("select * from bustable");
while(res.next()) {
pno=res.getInt("busno");
pno=res.getInt("regno");
}
txtsno.setText(String.valueOf(pno+1));
txtname.setText(String.valueOf(pno+1));
txtsno.enable(false);
txtname.enable(false);
txtaddress.requestFocus();
} catch(Exception e) {
}
}
62
txtname.setText(String.valueOf(pno+1));
txtsno.enable(false);
txtname.enable(false);
txtaddress.requestFocus();
}
catch(Exception e)
{}
}
package roadwayess;
import java.sql.*;
import javax.swing.*;
63
Connection c=DriverManager.getConnection("jdbc:odbc:road");
state=c.createStatement();
String query;
query="select * from bustable where busno="+cid+"";
ResultSet res =state.executeQuery(query);
if( res.next()) {
txtname.setText(res.getString("regno"));
txtaddress.setText(res.getString("totalseat"));
txtphone.setText(res.getString("fueltype"));
}
} catch(Exception e) {
}
}
txtname.setText("");
txtaddress.setText("");
txtphone.setText("");
JOptionPane.showMessageDialog(null,"Successfully deleted");
combo.removeAllItems();
} catch(Exception e) {
}
64
}
}
65
Modify bus form
package roadwayess;
import javax.swing.*;
import java.sql.*;
String query;
query="select * from bustable where busno="+cid+"";
ResultSet res =state.executeQuery(query);
if( res.next()) {
txtname.setText(res.getString("regno"));
txtaddress.setText(res.getString("totalseat"));
txtphone.setText(res.getString("fueltype"));
}
} catch(Exception e) {
}
}
66
// TODO add your handling code here:
try
{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection c=DriverManager.getConnection("jdbc:odbc:road");
state=c.createStatement();
String query;
query="select * from bustable";
ResultSet res =state.executeQuery(query);
while(res.next())
{
combo.addItem(res.getString("busno"));
}
}
catch(Exception e)
{}
}
String tname,taddress,tphone,query;
int bno;
tname=txtname.getText();
taddress=txtaddress.getText();
tphone=txtphone.getText();
String s=String.valueOf(combo.getSelectedItem());
bno=Integer.parseInt(s);
query="update bustable set
regno="+tname+",totalseat="+taddress+",fueltype='"+tphone+"'where
busno="+bno+"";
state.executeUpdate(query);
67
JOptionPane.showMessageDialog(null,"Successfully updated");
}catch(Exception e) {
JOptionPane.showMessageDialog(null,"Invalid data");
}
}
public static void main(String args[]) {
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new ModifyBusEntry().setVisible(true);
}
});
}
package roadwayess;
import javax.swing.*;
import java.sql.*;
import javax.swing.table.*;
68
private void txtActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
}
String query;
ResultSet res;
//Removing all rows;
int rows=m.getRowCount();
for(int i=0;i<rows;i++) {
m.removeRow(0);
}
if (op1.isSelected()) {
s=Integer.parseInt(txt.getText());
query="select * from bustable where busno="+s;
res=state.executeQuery(query);
while(res.next()) {
m.addRow(new Object[]
{ res.getString("busno"),res.getString("regno"),res.getString("totalseat"),res.getString("f
ueltype")});
}
} else if (op2.isSelected()) {
s=Integer.parseInt(txt.getText());
query="select * from bustable where regno="+s;
res=state.executeQuery(query);
while(res.next()) {
69
m.addRow(new Object[]
{ res.getString("busno"),res.getString("regno"),res.getString("totalseat"),res.getString("f
ueltype")});
}
}
{}
} catch(Exception e) {
JOptionPane.showMessageDialog(null,"Invalid data");
}
}
/**
* @param args the command line arguments
*/
public static void main(String args[]) {
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new SearchBusForm().setVisible(true);
}
});
}
70
Add staff form
package roadwayess;
import javax.swing.*;
import java.sql.*;
import java.awt.event.*;
71
// TODO add your handling code here:
txtname.setText("");
txtaddress.setText("");
txtcno.setText("");
txtsalary.setText("");
txtpost.setText("");
txtjd.setText("");
txtlno.setText("");
int pno=0;
try {
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection c=DriverManager.getConnection("jdbc:odbc:road");
Statement state=c.createStatement();
ResultSet res=state.executeQuery("select * from stafftable");
while(res.next()) {
pno=res.getInt("staffid");
}
txtid.setText(String.valueOf(pno+1));
txtid.enable(false);
txtname.requestFocus();
} catch(Exception e) {
}
}
72
if(!(ch>='0'&&ch<='9'||ch==KeyEvent.VK_ENTER||
ch==KeyEvent.VK_BACK_SPACE)) {
JOptionPane.showMessageDialog(null, "Invalid No.");
evt.consume();
txtpost.requestFocus();
}
73
}
74
Delete staff form
package roadwayess;
import javax.swing.*;
import java.sql.*;
import java.awt.event.*;
private void txtnameKeyTyped(java.awt.event.KeyEvent evt) {
// TODO add your handling code here:
char ch;
ch=evt.getKeyChar();
if(!(ch>='A'&&ch<='Z'||ch>='a'&&ch<='z'||ch==KeyEvent.VK_SPACE||
ch==KeyEvent.VK_BACK_SPACE||ch==KeyEvent.VK_ENTER)) {
JOptionPane.showMessageDialog(null, "Invalid Name.");
evt.consume();
txtname.requestFocus();
}
}
75
private void exitActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
dispose();
}
76
if(!(ch>='0'&&ch<='9'||ch==KeyEvent.VK_ENTER||
ch==KeyEvent.VK_BACK_SPACE||ch==KeyEvent.VK_SLASH)) {
JOptionPane.showMessageDialog(null, "Invalid No.");
evt.consume();
txtlno.requestFocus();
}
77
txtaddress.setText(res.getString("address"));
txtcno.setText(res.getString("contectno"));
txtsalary.setText(res.getString("salary"));
txtpost.setText(res.getString("post"));
txtjd.setText(res.getString("dateofjoining"));
txtlno.setText(res.getString("licenceno"));
}
} catch(Exception e) {
}
}
78
} catch(Exception e) {
}
}
/**
* @param args the command line arguments
*/
public static void main(String args[]) {
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new DeleteStaffEntry().setVisible(true);
}
});
}
79
package roadwayess;
import javax.swing.*;
import java.sql.*;
import java.awt.event.*;
80
// TODO add your handling code here:
dispose();
}
81
JOptionPane.showMessageDialog(null, "Invalid No.");
evt.consume();
txtlno.requestFocus();
}
82
txtcno.setText(res.getString("contectno"));
txtsalary.setText(res.getString("salary"));
txtpost.setText(res.getString("post"));
txtjd.setText(res.getString("dateofjoining"));
txtlno.setText(res.getString("licenceno"));
}
} catch(Exception e) {
}
}
try {
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection c=DriverManager.getConnection("jdbc:odbc:road");
Statement state=c.createStatement();
String query;
query="update stafftable set
staffname='"+name+"',address='"+address+"',contectno='"+cno+"',salary="+salary+",po
st='"+post+"',dateofjoining='"+dt+"',licenceno="+licenceno+" where staffid="+sid+"";
state.executeUpdate(query);
JOptionPane.showMessageDialog(null, "Sucessfully Update");
83
combo1.removeAllItems();
} catch(Exception e) {
}
}
package roadwayess;
84
import javax.swing.*;
import java.sql.*;
import javax.swing.table.*;
private void op1ActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
lbl.setText("Enter the staff id");
sid.setText("");
sid.requestFocus();
}
85
while(res.next()) {
m.addRow(new Object[]
{res.getString("staffid"),res.getString("staffname"),res.getString("address"),res.getStrin
g("contectno"),res.getString("salary"),res.getString("post"),res.getString("dateofjoining"
),res.getString("licenceno")});
}
} else if(op2.isSelected()) {
String s=sid.getText();
query="select * from stafftable where staffname='"+s+"'";
res=sate.executeQuery(query);
while(res.next()) {
m.addRow(new Object[]
{res.getString("staffid"),res.getString("staffname"),res.getString("address"),res.getStrin
g("contectno"),res.getString("salary"),res.getString("post"),res.getString("dateofjoining"
),res.getString("licenceno")});
}
}
{}
} catch(Exception e) {
JOptionPane.showMessageDialog(null, "Not Found");
}
}
86
});
}
package roadwayess;
import javax.swing.*;
import java.sql.*;
import java.awt.event.*;
String query;
query="select * from bustable where busno="+cid+"";
ResultSet res =state.executeQuery(query);
if( res.next()) {
txtrno.setText(res.getString("regno"));
txtts.setText(res.getString("totalseat"));
txtftype.setText(res.getString("fueltype"));
}
} catch(Exception e) {
}
}
87
// TODO add your handling code here:
char ch;
ch=evt.getKeyChar();
if(!(ch>='A'&&ch<='Z'||ch>='a'&&ch<='z'||ch==KeyEvent.VK_SPACE||
ch==KeyEvent.VK_BACK_SPACE||ch==KeyEvent.VK_ENTER)) {
JOptionPane.showMessageDialog(null, "Invalid Name.");
evt.consume();
txtrno.requestFocus();
}
}
88
evt.consume();
txtname .requestFocus();
}
}
89
dispose();
}
int pno=0;
try {
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection c=DriverManager.getConnection("jdbc:odbc:road");
Statement state=c.createStatement();
ResultSet res=state.executeQuery("select * from timingtable");
while(res.next()) {
pno=res.getInt("srno");
}
txtsrno.setText(String.valueOf(pno+1));
txtsrno.enable(false);
combo.requestFocus();
} catch(Exception e) {
90
}
}
91
catch (Exception e)
{}
Statement state=c.createStatement();
String query;
query="select * from bustable";
ResultSet res =state.executeQuery(query);
while(res.next())
{
combo.addItem(res.getString("busno"));
}
}
catch(Exception e)
{}
try
{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con=DriverManager.getConnection("jdbc:odbc:road");
Statement state=con.createStatement();
ResultSet res=state.executeQuery("select * from stafftable");
while(res.next())
{
combo2.addItem(res.getString("staffid"));
}
}
92
catch(Exception e)
{}
int pno=0;
try {
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection c=DriverManager.getConnection("jdbc:odbc:road");
Statement state=c.createStatement();
ResultSet res=state.executeQuery("select * from timingtable");
while(res.next()) {
pno=res.getInt("srno");
}
txtsrno.setText(String.valueOf(pno+1));
txtsrno.enable(false);
} catch(Exception e) {
}
}
package roadwayess;
import java.sql.*;
import javax.swing.*;
import java.awt.event.*;
93
public class Deletetimetable extends javax.swing.JFrame {
Connection c;
Statement state;
int s;
txtbno.setText("");
txtrno.setText("");
txtts.setText("");
txtftype.setText("");
txtsid.setText("");
txtname.setText("");
txtcno.setText("");
txtlno.setText("");
txtarrivel.setText("");
txtdept.setText("");
94
txtfrom.setText("");
txtstto.setText("");
txtviast.setText("");
JOptionPane.showMessageDialog(null,"Successfully deleted");
combo.removeAllItems();
} catch(Exception e) {
}
}
}
state=c.createStatement();
String query;
query="select * from timingtable";
ResultSet res =state.executeQuery(query);
while(res.next())
{
combo.addItem(res.getString("srno"));
}
}
catch(Exception e)
{}
95
}
String query;
query="select * from timingtable where srno="+cid+"";
ResultSet res =state.executeQuery(query);
if( res.next()) {
txtbno.setText(res.getString("bno"));
txtrno.setText(res.getString("regno"));
txtts.setText(res.getString("totalseats"));
txtftype.setText(res.getString("fueltype"));
txtsid.setText(res.getString("staffid"));
txtname.setText(res.getString("staffname"));
txtcno.setText(res.getString("staffphone"));
txtlno.setText(res.getString("lincenceno"));
txtarrivel.setText(res.getString("arriveltime"));
txtdept.setText(res.getString("departuretime"));
txtfrom.setText(res.getString("stationfrom"));
txtstto.setText(res.getString("stationto"));
txtviast.setText(res.getString("stationvia"));
}
} catch(Exception e) {
}
96
}
97
if(!(ch>='0'&&ch<='9'||ch==KeyEvent.VK_ENTER||
ch==KeyEvent.VK_BACK_SPACE)) {
JOptionPane.showMessageDialog(null, "Invalid No.");
evt.consume();
txtname .requestFocus();
}
}
package roadwayess;
import javax.swing.*;
import java.sql.*;
import java.awt.event.*;
98
public class Modifytimetable extends javax.swing.JFrame {
Connection c;
Statement state;
int s;
state=c.createStatement();
String query;
query="select * from timingtable";
ResultSet res =state.executeQuery(query);
while(res.next())
{
combo.addItem(res.getString("srno"));
}
}
catch(Exception e)
{}
}
99
try {
int sno,rgno,total,lno;
String bno,fuel,sid,name,cno,arrivel,depart,from,to,via;
bno=txtbno.getText();
String d=String.valueOf(combo.getSelectedItem());
sno=Integer.parseInt(d);
rgno=Integer.parseInt(txtrno.getText());
fuel=txtftype.getText();
total=Integer.parseInt(txtts.getText());
sid=txtsid.getText();
name=txtname.getText();
cno=txtcno.getText();
lno=Integer.parseInt(txtlno.getText());
arrivel=txtarrivel.getText();
depart=txtdept.getText();
from=txtfrom.getText();
to=txtstto.getText();
via=txtviast.getText();
String query;
query="update timingtable set
bno='"+bno+"',regno="+rgno+",totalseats="+total+",fueltype='"+fuel+"',staffid="+sid+"
,staffname='"+name+"',staffphone='"+cno+"',lincenceno="+lno+",arriveltime='"+arrivel
+"',departuretime='"+depart+"',stationfrom='"+from+"',stationto='"+to+"',stationvia='"+
via+"' where srno="+sno+"";
state.executeUpdate(query);
JOptionPane.showMessageDialog(null,"Successfully updated");
}catch(Exception e) {
JOptionPane.showMessageDialog(null,"Invalid data");
}
100
}
101
if(!(ch>='0'&&ch<='9'||ch==KeyEvent.VK_ENTER||
ch==KeyEvent.VK_BACK_SPACE)) {
JOptionPane.showMessageDialog(null, "Invalid No.");
evt.consume();
txtname .requestFocus();
}
}
String query;
query="select * from timingtable where srno="+cid+"";
ResultSet res =state.executeQuery(query);
if( res.next()) {
txtbno.setText(res.getString("bno"));
txtrno.setText(res.getString("regno"));
txtts.setText(res.getString("totalseats"));
102
txtftype.setText(res.getString("fueltype"));
txtsid.setText(res.getString("staffid"));
txtname.setText(res.getString("staffname"));
txtcno.setText(res.getString("staffphone"));
txtlno.setText(res.getString("lincenceno"));
txtarrivel.setText(res.getString("arriveltime"));
txtdept.setText(res.getString("departuretime"));
txtfrom.setText(res.getString("stationfrom"));
txtstto.setText(res.getString("stationto"));
txtviast.setText(res.getString("stationvia"));
}
} catch(Exception e) {
}
package roadwayess;
import javax.swing.*;
import java.sql.*;
103
import javax.swing.table.*;
104
m.addRow(new Object[]
{res.getString("srno"),res.getString("bno"),res.getString("regno"),res.getString("totalsea
ts"),res.getString("fueltype"),res.getString("staffid"),res.getString("staffname"),res.getSt
ring("staffphone"),res.getString("lincenceno"),res.getString("arriveltime"),res.getString(
"departuretime"),res.getString("stationfrom"),res.getString("stationto"),res.getString("st
ationvia")});
}
} else if(op2.isSelected()) {
String s=sid.getText();
query="select * from timingtable where bno='"+s+"'";
res=sate.executeQuery(query);
while(res.next()) {
m.addRow(new Object[]
{res.getString("srno"),res.getString("bno"),res.getString("regno"),res.getString("totalsea
ts"),res.getString("fueltype"),res.getString("staffid"),res.getString("staffname"),res.getSt
ring("staffphone"),res.getString("lincenceno"),res.getString("arriveltime"),res.getString(
"departuretime"),res.getString("stationfrom"),res.getString("stationto"),res.getString("st
ationvia")});
}
}
{}
} catch(Exception e) {
}
}
105
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new Searchtimetable().setVisible(true);
}
});
}
106
List of bus
package roadwayess;
import javax.swing.*;
import java.sql.*;
import javax.swing.table.*;
107
m.addRow(new Object[]
{ res.getString("busno"),res.getString("regno"),res.getString("totalseat"),res.getString("f
ueltype")});
}
}
catch(Exception e)
{}
}
108
List of staff
package roadwayess;
import javax.swing.*;
import java.sql.*;
import javax.swing.table.*;
109
}
}
catch(Exception e)
{}
}
package roadwayess;
import java.sql.*;
import javax.swing.table.*;
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
dispose();
}
110
for(int i=0;i<row;i++) {
m.removeRow(0);
}
}
}
catch(Exception e)
{}
}
111
Change password form
package roadwayess;
import java.sql.*;
import javax.swing.*;
} else {
int val;
val=JOptionPane.showConfirmDialog(null, "Incorrect, Try again");
if(val==JOptionPane.NO_OPTION ) {
System.exit(0);
}
} catch(Exception t) {
}
}
112
private void OKActionPerformed(java.awt.event.ActionEvent evt) {
String lname,pass,repass,query;
lname=txtnewlogin.getText();
pass=txtnewpass.getText();
repass=txtrpass.getText();
try {
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con=DriverManager.getConnection("jdbc:odbc:road");
Statement state=con.createStatement();
if(pass.equals(repass)) {
query="update logintable set loginname= '"+lname+"',password='"+pass+"'";
state.executeUpdate(query);
JOptionPane.showMessageDialog(null, "Successfully Saved");
txtnewlogin.setText("");
txtnewpass.setText("");
txtlogin2.setText("");
txtpass2.setText("");
txtrpass.setText("");
}
if(lname.equals("")) {
JOptionPane.showMessageDialog(null, "Invalid Username");
}
} catch(Exception t) {
}
}
113
public static void main(String args[]) {
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new changepass().setVisible(true);
}
});
}
114
115
TESTING & DEBUGGING
TESTING
It should be clear in mind that the philosophy behind testing is to find errors. Test cases
are devised with this purpose in mind. A test case is a set of data that the system will
process as normal input. However, the data are created with the express intent of
determining whether the system will process them correctly. For example, test cases for
inventory handling should include situations in which the quantifies to be withdrawn
from inventory exceed, equal and are less than the actual quantities on hand. Each test
case is designed with the intent of finding errors in the way the system will process it.
There are two general strategies for testing software: Code testing and Specification
testing. In code testing, the analyst develops that cases to execute every instructions and
path in a program. Under specification testing, the analyst examines the program
specifications and then writes test data to determine how the program operates under
specific conditions. Regardless of which strategy the analyst follows, there are preferred
practices to ensure that the testing is useful. The levels of tests and types of test data,
combined with testing libraries, are important aspects of the actual test process.
Levels of Testing
Systems are not designed as entire systems nor are they tested as single systems. The
analyst must perform both unit and system testing.
Unit Testing:
In unit testing the analyst tests the programs making up a system. For this reason, unit
testing is sometimes called program testing. Unit testing gives stress on the modules
independently of one another, to find errors. This helps the tester in detecting errors in
coding and logic that are contained within that module alone. The errors resulting from
the interaction between modules are initially avoided. For example, a hotel information
system consists of modules to handle reservations; guest checking and checkout;
restaurant, room service and miscellaneous charges; convention activities; and accounts
116
receivable billing. For each, it provides the ability to enter, modify or retrieve data and
respond to different types of inquiries or print reports. The test cases needed for unit
testing should exercise each condition and option.
Unit testing can be performed from the bottom up, starting with smallest and lowest-
level modules and proceeding one at a time. For each module in bottom-up testing a
short program is used to execute the module and provides the needed data, so that the
module is asked to perform the way it will when embedded within the larger system.
System Testing:
The important and essential part of the system development phase, after designing and
developing the software is system testing. We cannot say that every program or system
design is perfect and because of lack of communication between the user and the
designer, some error is there in the software development. The number and nature of
errors in a newly designed system depend on some usual factors like communication
between the user and the designer; the programmer's ability to generate a code that
reflects exactly the systems specifications and the time frame for the design.
Theoretically, a newly designed system should have all the parts or sub-systems are in
working order, but in reality, each sub-system works independently. This is the time to
gather all the subsystem into one pool and test the whole system to determine whether it
meets the user requirements. This is the last change to detect and correct errors before
the system is installed for user acceptance testing. The purpose of system testing is to
consider all the likely variations to which it will be subjected and then push the system
to its limits.
Testing is an important function to the success of the system. System testing makes a
logical assumption that if all the parts of the system are correct, the goal will be
successfully activated. Another reason for system testing is its utility as a user-oriented
vehicle before implementation.
117
2) String testing
3) System testing
4) System documentation
5) User acceptance testing
Program Testing:
When a program is tested, the actual output is compared with the expected output.
When there is a discrepancy, the sequence of the instructions, must be traced to
determine the problem. The process is facilitated by breaking the program down into
self-contained portions, each of which can be checked at certain key points.
String Testing:
Programs are invariably related to one another and interact in a total system. Each
program is tested to see whether it conforms to related programs in the system. Each
part of the system is tested against the entire module with both test and live data before
the whole system is ready to be tested.
118
System Testing:
System testing is designed to uncover weaknesses that were not found in earlier tests.
This includes forced system failure and validation of total system as it will be
implemented by its user in the operational environment. Under this testing, generally we
take low volumes of transactions based on live data. This volume is increased until the
maximum level for each transaction type is reached. The total system is also tested for
recovery and fallback after various major failures to ensure that no data are lost during
the emergency. All this is done with the old system still in operation. When we see that
the proposed system is successful in the test, the old system is discontinued.
System Documentation:
All design and test documentation should be well prepared and kept in the library for
future reference. The library is the central location for maintenance of the new system.
An acceptance test has the objective of selling the user on the validity and reliability of
the system. It verifies that the system's procedures operate to system specifications and
that the integrity of important data is maintained. Performance of an acceptance test is
actually the user's show. User motivation is very important for the successful
performance of the system. After that a comprehensive test report is prepared. This
report shows the system's tolerance, performance range, error rate and accuracy.
There are other six tests which fall under special category. They are described below:
Peak Load Test: It determines whether the system will handle the volume of activities
that occur when the system is at the peak of its processing demand. For example, test
the system by activating all terminals at the same time.
119
Storage Testing: It determines the capacity of the system to store transaction data on a
disk or in other files. For example, verify documentation statements that the system will
store 10,000 records of 400 bytes length on a single flexible disk.
Performance Time Testing: it determines the length of time system used by the system
to process transaction data. This test is conducted prior to implementation to determine
how long it takes to get a response to an inquiry, make a backup copy of a file, or send a
transmission and get a response.
Recovery Testing: This testing determines the ability of user to recover data or re-start
system after failure. For example, load backup copy of data and resume processing
without data or integrity loss.
Human Factors Testing: It determines how users will use the system when processing
data or preparing reports.
DEBUGGING
This stage is the discovery & correction of programming errors. Few programs run
correctly the first time, so debugging is important & time-consuming stage of the
software development. Programming theorists & testing as verification & validation,
respectively. Verification ensures that the program does what the programmer intend to
do. It is the checking or testing of the items ,including software ,for conformance and
consistency with an associated specification. Validation ensures that the program
produces the correct results for a set of test data. It refers to the different set of activities
that ensures that the software that has been built is traceable to custom requirements.
120
VERIFICATIONAre we building the product right?
121
.
Description :- This process is for the new bus entry. This process displays the all
information about the Vehicle according to the selection criteria
of the bus.This process gives the facility of selecting different
types of query about the particular bus.
Description : This process displays the all information about the Driver
according to the selection criteria of the Driver.This process gives
the facility of selecting different types of query about the
particular Driver.
Description :- This process is for the searching the entry of particular Buses for
Transportation.
122
Description :- This process is for the displaying the reports of Driver, Staff and Time
table etc.
123
124
Future Enhancement
This project was developed to fulfill user requirement; however there are lots of scope
to improve the performance of the roadways management System in the area of user
interface, database performance, and query processing time. Etc.
So there are many things for future enhancement of this project. The future
enhancements that are possible in the project are as follows.
Web Based interface for system administrator to add modify question bank,
which presently done from back end
Web based interface for generate reports, student test details for system
administrator
Linking and integration of other online educational web sites.
Integration with university database through Web Services
Connection to third-party OLAP applications
In the area of data security and system security.
Provide more online tips and help.
To optimize the query which is embedded in the system?
125
CONCLUSION
The project made me realize the significance of developing software for client,
where all the eventualities have to be taken care of, unlike at educational institution,
where the sole aim is to learn. What may be seen to the developed to be a software
complete in all respects, I was required to meet the stringent demands of the in-house
client in the materials department. Through this seemed tough at first, I realized that
During the project, the real importance for following all the principle of System
Analysis and Design drawled on me. I felt the necessity of going through the several
stages, because only such a process could make one understand the problems at hand,
more so due to the enormous size of data stores involved and their manipulation
In retrospect, I would like to say that the institute provided us with sample
opportunities to learn Oracle 8 and its tools. I specifically was able to learn MS-
ACCESS and its Tools. I specially was able to learn JAVA NETBEANS I also
only hazy blobs in the realm of our comprehension. However my project library
are possible in this project such as new forms & reports can be included as and when
required.
Unfortunately due to lack of time we can developed any report in this system but
this is not the end of this system software, it is beginning. We can change and modify
126
this software due to more requirements of needs and also removed some errors which
We also developed some complex reports which is required and makes this
software more powerful and friendly for user by which user can handle library data
more easily and can calculate all the calculation without any other software i.e., users
all the requirements will be fulfill by this software and user can manage all the
127
BIBLIOGRAPHY
The following are the books references that have been studied in the duration of making
of this project.
WEB REFRENCES
www.microsoft.com
www.google.com
www.wekipedia.com
128