Академический Документы
Профессиональный Документы
Культура Документы
Introduction
This Project aims to model the working of a Courier Management System. This
Project uses Java as the programming Language.
Todays world is very fast and competitive. To achieve the success in this
competitive world, one should be aware of the computer and the information
related to the concerned business because computer and the information plays an
important weeks manually. Right information available at the right place makes
the decision process efficient. Hence the identification of the current and future
requirement becomes a basic need of any flexible information system
Courier management system is software which is used manage the work
regarding the services of the courier in an effective & efficient manner.
Basically it stores the information regarding the customer and his material,
which has to be couriered.
This project is based on the 2-tier architecture. The Project is developed keeping
in mind the security needs of today. The project is totally built at administrative
end and thus only the administrator is guaranteed the access.
Objective
The software aims at making the work of the entire staff of the Courier
Department very easy, to save their time. To maintain their documents, to
maintain their tasks performed in timely manner. The system saves your time
and gives out the accurate documentation.
The proposed system has been designed in such a way that can be operated by
various kinds of users. The working of software is very easy to understand it is
very graphical and it is user friendly.
System Analysis
System analysis is a process of gathering and interpreting facts,
diagnosing problems and the information to recommend improvements on the
system. It is a problem solving activity that requires intensive communication
between the system users and system developers. System analysis or study is an
important phase of any system development process. The system is studied to
the minutest detail and analyzed. The system analyst plays the role of the
interrogator and dwells deep into the working of the present system. The system
is viewed as a whole and the input to the system are identified. The outputs from
the organizations are traced to the various processes. System analysis is
concerned with becoming aware of the problem, identifying the relevant and
decisional variables, analyzing and synthesizing the various factors and
determining an optimal or at least a satisfactory solution or program of action.
Identification of Need
The 1st step of the system analysis procedure involves the identification of
requirement. The analyst system engineer meets with the customer and the end
user if different from the customer. Customer may be a representative of an
outside organization the marketing department of the analyst's organization
when a product is being established or another technical department when an
internal system is to be established. Like information engineering the intent is to
understand the product's goal and to describe the target wants to meet the goal.
Once overall target are identified the analyst moves on to an evaluation of
supplementary information that are: Does the technology exist to build the
system? What special manufacturing and development resources will be
needed? What bounds have been placed on schedule and costs? If the new
system is really a product to be established for sale to various customers the
following questions are also asked that are how does this product compare with
competitive products? What is the potential market for the product? What
position does this product take in the overall product line of the organization?
Economic Feasibility:
Economic feasibility is used to determine the benefits and savings expected
from the candidate system and to compare them with costs incurred. If benefits
outweigh cost, then decision will be to design and implement system. Otherwise,
alterations will have to be made to the proposed system. The proposed system is
economically feasible.
Technical Feasibility:
Technical feasibility centers on existing system and to what extent it can support
proposed modifications. It involves financial enhancement. This evaluation
determines whether the technology needed for the proposed system is available
7
or not. This is concerned with specifying satisfy the user requirements. The
technical needs of the system may include front-end and backend-selection.
An important issue for the development of a project is the selection of suitable
front-end and back-end. Based on some aspects, we select the most suitable
platform that suits the needs of the organization.
Operational Feasibility:
The present system is easily understandable. The users are presented with
friendly user interface that helps them to understand the flow of the system more
easily. Maximum transparency has been provided. The new system is very much
user friendly and operational cost is bearable. The maintenance and working of
the new system needs less human efforts. The proposed project is beneficial to
the organizational and is user friendly.
PERT Chart
Collect
Information
Start
Survey Report
Format Design
Meet end user
Meet manager
Visit Office
Coding of Project
Finish
Visit In
GANTT Chart
A Gantt chart is a horizontal bar chart developed as a production control tool
in 1917 by Henry L. Gantt, an American engineer and social scientist. A Gantt
chart provides a graphical illustration of a schedule that helps to plan,
coordinate and track specific tasks in a project.
ACTIVITY
11/0518/05
18/0525/05
1/0610/06
11/0620/06
Project
Search
Finalization&
Allocation
Investigation
of system
requirement
System
Design
Program
design
Program
coding
System
integration
Acceptance
test
10
01/0810/09
12/09-18/09
19/0925/09
There are a large number of software models used for guiding the
software development process. Normally every software model contains
almost same life cycle except there are some difference process
techniques. In this software we have used the linear sequential model
because it is easiest one to implement and we have to follow the
straightforward techniques for developing the software. There are
following steps we have done through in the complete process.
ANALYSIS:- In this step we have gathered the different requirement to
develop the software, to understand the nature of the program to be build
and all the requirement for both the system and the users has been
identified.
DESIGN:- Software design is actually a group of process that a group of
that focuses on four distinct attribute of a program- data structure,
software architecture, interface representation and procedural detail the
design process translates requirements into a representation of the software
that can be accessed for quality before coding begins. Like requirements
the design is documented becomes part of the software configuration
CODE GENERATION:- The design must be translated into a machine
readable from to develop the software. The code generation step performs
this task. If design is performed in a detail manner, this code generation
can accomplish EASILY.
TESTING:- Once code has been generated the program testing begins.
The testing begins. The testing process focuses on the logical internals of
the software, ensuring that all statement have been tested and on the
functional externals, that is conducting tests to uncover errors and ensure
that defined input will produce actual result that agree with required
result.
11
12
13
Processor
2.
RAM
512MB
3.
HDD
40GB
4.
Monitor
5.
Pointing device
6.
Keyboard
104 Keys
SOFTWARE CONFIGURATION
1) FRONT END
2) Platform
Microsoft Windows
3) Back End
Oracle 10G
14
16
Java SE (Standard Edition): For general purpose use on desktop PCs, servers
and similar devices.
Java EE (Enterprise Edition): Java SE plus various APIs useful for multi-tier
client-server enterprise applications.
The Java Platform consists of several programs,
each of which provides a distinct portion of its overall capabilities. For example,
the Java compiler, which converts Java source code into Java bytecode (an
intermediate language for the Java Virtual Machine (JVM)), is provided as part
of the Java Development Kit (JDK). The sophisticated Java Runtime
Environment (JRE), complementing the JVM with a just-in-time (JIT) compiler,
converts intermediate bytecode into native machine code on the fly. Also
supplied are extensive libraries (pre-compiled into Java bytecode) containing
reusable code, as well as numerous ways for Java applications to be deployed,
including being embedded in a web page as an applet.There are several other
components, some available only in certain editions.
The essential components in the platform are the Java language
compiler, the libraries, and the runtime environment in which Java intermediate
byte code "executes" according to the rules laid out in the virtual machine
specification.
Java Virtual Machine
The heart of the Java Platform is the concept of a "virtual machine" that
executes Java byte code programs. This byte code is the same no matter what
hardware or operating system the program is running under. There is a JIT
compiler within the Java Virtual Machine, or JVM. The JIT compiler translates
the Java byte code into native processor instructions at run-time and caches the
native code in memory during execution.
The use of byte code as an intermediate language
permits Java programs to run on any platform that has a virtual machine
available. The use of a JIT compiler means that Java applications, after a short
delay during loading and once they have "warmed up" by being all or mostly
JIT-compiled, tend to run about as fast as native programs. Since JRE version
17
platform. One should be able to write a program once, compile it once, and run
it anywhere.
This is achieved by most Java compilers by compiling the Java language code
halfway (to Java bytecode) simplified machine instructions specific to the Java
platform. The code is then run on a virtual machine (VM), a program written in
native code on the host hardware that interprets and executes generic Java
bytecode. (In some JVM versions, bytecode can also be compiled to native code,
either before or during program execution, resulting in faster execution.)
Further, standardized libraries are provided to allow access to features of the
host machines (such as graphics, threading and networking) in unified ways.
The first implementations of the language used an interpreted virtual machine to
achieve portability. These implementations produced programs that ran more
slowly than programs compiled to native executables, for instance written in C
or C++, so the language suffered a reputation for poor performance. More recent
JVM implementations produce programs that run significantly faster than
before, using multiple techniques.
One technique, known as just-in-time compilation (JIT), translates
the Java bytecode into native code at the time that the program is run, which
results in a program that executes faster than interpreted code but also incurs
compilation overhead during execution. More sophisticated VMs use dynamic
recompilation, in which the VM can analyze the behavior of the running
program and selectively recompile and optimize critical parts of the program.
Dynamic recompilation can achieve optimizations superior to static compilation
because the dynamic compiler can base optimizations on knowledge about the
runtime environment and the set of loaded classes, and can identify the hot spots
(parts of the program, often inner loops, that take up the most execution time).
JIT compilation and dynamic recompilation allow Java programs to take
advantage of the speed of native code without losing portability.
Another technique, commonly known as static compilation, is to compile
directly into native code like a more traditional compiler. Static Java compilers,
such as GCJ, translate the Java language code to native object code, removing
the intermediate bytecode stage. This achieves good performance compared to
19
interpretation, but at the expense of portability; the output of these compilers can
only be run on a single architecture. Some see avoiding the VM in this manner
as defeating the point of developing in Java; however it can be useful to provide
both a generic bytecode version, as well as an optimised native code version of
an application.
Automatic memory management
One of the ideas behind Java's automatic memory management model is that
programmers be spared the burden of having to perform manual memory
management. In some languages the programmer allocates memory for the
creation of objects stored on the heap and the responsibility of later deallocating
that memory also resides with the programmer. If the programmer forgets to
deallocate memory or writes code that fails to do so, a memory leak occurs and
the program can consume an arbitrarily large amount of memory. Additionally,
if the program attempts to deallocate the region of memory more than once, the
result is undefined and the program may become unstable and may crash.
Finally, in non garbage collected environments, there is a certain degree of
overhead and complexity of user-code to track and finalize allocations. Often
developers may box themselves into certain designs to provide reasonable
assurances that memory leaks will not occur.
In Java, this potential problem is avoided by automatic garbage collection. The
programmer determines when objects are created, and the Java runtime is
responsible for managing the object's lifecycle. The program or other objects can
reference an object by holding a reference to it (which, from a low-level point of
view, is its address on the heap). When no references to an object remain, the
Java garbage collector automatically deletes the unreachable object, freeing
memory and preventing a memory leak. Memory leaks may still occur if a
programmer's code holds a reference to an object that is no longer neededin
other words, they can still occur but at higher conceptual levels.
The use of garbage collection in a language can also affect programming
paradigms. If, for example, the developer assumes that the cost of memory
allocation/recollection is low, they may choose to more freely construct objects
instead of pre-initializing, holding and reusing them. With the small cost of
20
21
22
23
level of detail. A DFD consists of a series of bubbles joined by data flows in the
system.
DFD SYMBOLS:
In the DFD, there are four symbols
24
Data flow
Data Store
CONSTRUCTING A DFD:
1. Process should be named and numbered for an easy reference. Each name
should be representative of the process.
2. The direction of flow is from top to bottom and from left to right. Data
traditionally flow from source to the destination although they may flow back
to the source. One way to indicate this is to draw long flow line back to a
source. An alternative way is to repeat the source symbol as a destination.
Since it is used more than once in the DFD it is marked with a short diagonal.
3. When a process is exploded into lower level details, they are numbered.
4. The names of data stores and destinations are written in capital letters.
Process and dataflow names have the first letter of each work capitalized
25
Context Diagram
Manages
ADMINISTRATOR
Place
Consignment
Courier
Management
System
CONSIGNER
26
27
28
FLIGHT
Flight
Search Process
Display Process
Flight Info
29
TICKET
Ticket Code For
Searching
Ticket
Search Process
Display Process
Ticket Info
30
USER
User Enter Their Password & User_id for opening the
application
Password
Validity
ess
CMS
31
USER_ID
ER Diagram
32
System Design
INPUT DESIGN
Input design is the process of converting a user-oriented description of the inputs
to a computer based business system into a programmer-oriented specification.
Inaccurate input data is the most common cause of processing errors. Effective
input design minimizes errors made by data entry operators. The input design is
the link that ties information system into the world of its users. Input design
consists of developing specific procedures for data preparations, steps necessary
to put the transaction data in the form that is usable for computer processing.
The data entry operator need to know the space allocated for each field, the field
sequence which must match with the source document and the format in which
the data is entered.
This project Airline Reservation System has got several inputs taken from the
user. They are:
Details of Flights.
Details Of passengers.
Details of Ticket Booking and Cancellation
The system is provided with Java pages for the user to input above details. Only
the administrator and registered user are able to upload data. So their details are
the major inputs to the system.
33
OUTPUT DESIGN
Outputs form computer systems are required primarily to communicate the
processing to the end users. The output of the system designed in such a way
that it provides, opportunities, problem or warnings, trigger an action and
confirm an action. The user-friendly interfaces provide a clear output to the
system.
The output of this software system is a Window Application. This system
consists of displaying Flight details, List of booked Ticket, list of cancelled
Tickets.
Module design:
Software design sits at the technical kernel of the software engineering
process and is applied regardless of the development paradigm and area of
application. Design is the first step in the development phase for any engineered
product or system. The designers goal is to produce a model or representation
of an entity that will later be built. Beginning, once system requirement have
been specified and analyzed, system design is the first of the three technical
activities -design, code and test that is required to build and verify software.
The importance can be stated with a single word Quality. Design is the
place where quality is fostered in software development. Design provides us
with representations of software that can assess for quality. Design is the only
way that we can accurately translate a customers view into a finished software
product or system. Software design serves as a foundation for all the software
engineering steps that follow. Without a strong design we risk building an
unstable system one that will be difficult to test, one whose quality cannot be
assessed until the last stage.
During design, progressive refinement of data structure, program
structure, and procedural details are developed reviewed and documented.
System design can be viewed from either technical or project management
perspective. From the technical point of view, design is comprised of four
34
Administrator Module.
Reservation Module.
Search Module.
Payment.
Cancellation.
Administrator Module.
Enables the administrator to perform all administrative functions and
manage inventory over LAN. The administrator can define or modify routes,
fares schedules and assign or deny access for authorized users.
Reservation Module.
This module is used for booking the ticket.
Search Module.
This module is used to search the Flights on the basis of source, destination
and routes.
Payment.
It provides the airline system with the ability to set up various payment
options for reservations.
35
Cancellation.
This module is used to cancel the existing booking.
36
DATABASE DESIGN
TABLES
1. dbdetails : This table store the details of Delivery Boy Details.
Type
Size
constraints
Delid
Varchar
PRIMARY KEY
Delname
Varchar
25
NOT NULL
City
Varchar
20
NOT NULL
Address
Varchar
50
NOT NULL
Mobileno
Varchar
10
Field
Name
2. Employee
This table is used to store employee details.
Field name
Data Type
Size
constraints
Emp_id
Varchar
PRIMARY KEY
emp_name
Varchar
25
NOT NULL
emp_address
Varchar
50
NOT NULL
Emp_phone
Varchar
11
NOT NULL
37
3. Calculation
This table is used to Charge Details.
Field name
Data type
Size
destination
Varchar
30
Charge_per_gram Number
4. courier_details
This table is used to store the Consignment Details.
Field name
Data type
Size
constraints
courier_id
Number(4)
10
PRIMARY KEY
s_name
Varchar
30
NOT NULL
s_address
Varchar
50
NOT NULL
S_city
Varchar
25
NOT NULL
S_state
Varchar
25
NOT NULL
s_phone
Varchar
11
NOT NULL
r_name
Varchar
30
NOT NULL
38
r_address
Varchar
50
NOT NULL
r_city
Varchar
25
NOT NULL
R_state
Varchar
25
NOT NULL
r_phone
Varchar
11
NOT NULL
Status
Varchar
25
NOT NULL
Amount
Number
NOT NULL
Description
Varchar
255
NOT NULL
empid
varchar
Foreign Key
1. Login
Field name
Data type
Size
Constraints
username
Varchar
25
Primary Key
password
Varchar
25
NOT NULL
type
Varchar
25
NOT NULL
39
Coding
Login.java
package project;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import javax.swing.JOptionPane;
public class login extends javax.swing.JFrame {
Connection con;
PreparedStatement ps;
ResultSet rs;
static String n;
public login() {
initComponents();
conn();
}
void conn()
{
try
{
40
Class.forName("oracle.jdbc.driver.OracleDriver");
Connection con =
DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:XE","air","air
");
}
catch(Exception exp)
{
JOptionPane.showMessageDialog(this,exp.getMessage());
}
}
private void btn1ActionPerformed(java.awt.event.ActionEvent evt) {
try
{
String p=String.valueOf(pass.getPassword());
String s="select Pwd from login where User_Id=?";
ps=con.prepareStatement(s);
ps.setString(1,txt1.getText());
rs=ps.executeQuery();
if(rs.next())
{
if(p.equals(rs.getString("Pwd")))
{
n=txt1.getText();
41
JOptionPane.showMessageDialog(this,"Welcome"+" "+n);
new menus().setVisible(true);
setVisible(false);
}
else
{
JOptionPane.showMessageDialog(this,"password incorrect");
}
}
else
{
JOptionPane.showMessageDialog(this,"username
password
found");
}
}
catch(Exception ex)
{
JOptionPane.showMessageDialog(this,ex.getMessage());
}
}
not
txt1.setText(null);
pass.setText(null);
}
}
43
Flightenuiry.java
package project;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.util.Vector;
import javax.swing.JOptionPane;
import javax.swing.table.DefaultTableModel;
public class Flightenquery extends javax.swing.JFrame {
Connection con;
PreparedStatement ps;
ResultSet rs;
Vector<String> col;
Vector<Vector<String>> data;
public Flightenquery() {
initComponents();
conn();
add();
}
void conn()
{
44
try
{
Class.forName("oracle.jdbc.driver.OracleDriver");
Connection con =
DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:XE","air","air
");
}
catch(Exception ex)
{
JOptionPane.showMessageDialog(this, ex.getMessage());
}
}
void add()
{
cbox1.addItem("Select City");
cbox1.addItem("NEW DELHI");
cbox1.addItem("MUMBAI");
cbox1.addItem("LUCKNOW");
cbox1.addItem("KANPUR");
cbox1.addItem("KOLKATTA");
cbox1.addItem("CHENNAI");
cbox1.addItem("BANGLORE");
cbox1.addItem("HYDRABAD");
45
cbox1.addItem("GOA");
cbox2.addItem("Select City");
cbox2.addItem("NEW DELHI");
cbox2.addItem("MUMBAI");
cbox2.addItem("LUCKNOW");
cbox2.addItem("KANPUR");
cbox2.addItem("KOLKATTA");
cbox2.addItem("CHENNAI");
cbox2.addItem("BANGLORE");
cbox2.addItem("HYDRABAD");
cbox2.addItem("GOA");
}
void add2()
{
col=new Vector<String>();
col.add("Flight no");
col.add("Flight name");
col.add("Days");
col.add("Route");
col.add("Executive class Seats");
col.add("Fare");
col.add("Business class Seats");
col.add("Fare");
46
}
private void btn1ActionPerformed(java.awt.event.ActionEvent evt) {
try
{
add2();
data=new Vector<Vector<String>>();
String s="select
Flight.F_no,F_name,days,route,EX_Class,EX_Class_Fare,B_Class,B_Class_Far
e from Flight,Fare where source=? and destination=? and
Flight.F_no=Fare.F_no";
ps=con.prepareStatement(s);
ps.setString(1,cbox1.getSelectedItem().toString());
ps.setString(2,cbox2.getSelectedItem().toString());
rs=ps.executeQuery();
while(rs.next())
{
Vector<String> row=new Vector<String>();
row.add(rs.getString("F_no"));
row.add(rs.getString("F_name"));
row.add(rs.getString("days"));
row.add(rs.getString("route"));
row.add(String.valueOf(rs.getInt("EX_Class")));
row.add(rs.getString("EX_Class_Fare"));
row.add(String.valueOf(rs.getInt("B_Class")));
47
row.add(rs.getString("B_Class_Fare"));
data.add(row);
}
tab.setModel(new DefaultTableModel(data,col));
}
catch(Exception ex)
{
JOptionPane.showMessageDialog(this, ex.getMessage());
}
}
public static void main(String args[]) {
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new Flightenquery().setVisible(true);
}
});
}
// Variables declaration - do not modify
private javax.swing.JButton btn1;
private javax.swing.JComboBox cbox1;
private javax.swing.JComboBox cbox2;
private javax.swing.JLabel jLabel1;
private javax.swing.JLabel jLabel2;
48
{
try
{
Class.forName("oracle.jdbc.driver.OracleDriver");
Connection con =
DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:XE","air","air
");
}
catch(Exception ex)
{
JOptionPane.showMessageDialog(this, ex.getMessage());
}
}
void add()
{
try
{
String s="select F_no from Flight";
ps=con.prepareStatement(s);
rs=ps.executeQuery();
while (rs.next())
{
cbox.addItem(rs.getString("F_no"));
50
}
}
catch(Exception ex)
{
JOptionPane.showMessageDialog(this,ex.getMessage());
}
}
private void btn1ActionPerformed(java.awt.event.ActionEvent evt) {
try
{
String s="insert into Fare values(?,?,?)";
ps=con.prepareStatement(s);
ps.setString(1,cbox.getSelectedItem().toString());
ps.setString(2,txt1.getText());
ps.setString(3,txt2.getText());
ps.executeUpdate();
JOptionPane.showMessageDialog(this,"Fare Successfully set");
}
catch(Exception ex)
{
JOptionPane.showMessageDialog(this,ex.getMessage());
}
}
51
Flightmaster.java
package project;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import javax.swing.JOptionPane;
public class Flightmaster extends javax.swing.JFrame {
Connection con;
PreparedStatement ps;
public Flightmaster() {
initComponents();
add();
con();
}
void add()
{
cbox1.addItem("NEW DELHI");
cbox1.addItem("MUMBAI");
cbox1.addItem("LUCKNOW");
cbox1.addItem("KANPUR");
53
cbox1.addItem("KOLKATTA");
cbox1.addItem("CHENNAI");
cbox1.addItem("BANGLORE");
cbox1.addItem("HYDRABAD");
cbox1.addItem("GOA");
cbox2.addItem("NEW DELHI");
cbox2.addItem("MUMBAI");
cbox2.addItem("LUCKNOW");
cbox2.addItem("KANPUR");
cbox2.addItem("KOLKATTA");
cbox2.addItem("CHENNAI");
cbox2.addItem("BANGLORE");
cbox2.addItem("HYDRABAD");
cbox2.addItem("GOA");
}
void con()
{
try
{
Class.forName("oracle.jdbc.driver.OracleDriver");
Connection con =
DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:XE","air","air
");
54
}
catch(Exception exp)
{
JOptionPane.showMessageDialog(this, exp.getMessage());
}
}
private void cbox1ItemStateChanged(java.awt.event.ItemEvent evt) {
txt3.setText(cbox1.getSelectedItem().toString());
txt6.setText(txt3.getText()+"-"+txt4.getText());
txt6.setEditable(false);
}
private void cbox2ItemStateChanged(java.awt.event.ItemEvent evt) {
txt4.setText(cbox2.getSelectedItem().toString());
txt6.setText(txt3.getText()+"-"+txt4.getText());
txt6.setEditable(false);
}
private void btn1ActionPerformed(java.awt.event.ActionEvent evt) {
try
{
String s="insert into Flight values(?,?,?,?,?,?,?,?)";
ps=con.prepareStatement(s);
ps.setString(1,txt1.getText());
ps.setString(2,txt2.getText());
55
ps.setString(3,txt3.getText());
ps.setString(4,txt4.getText());
ps.setString(5,txt5.getText());
ps.setString(6,txt6.getText());
ps.setInt(7,Integer.parseInt(txt7.getText()));
ps.setInt(8,Integer.parseInt(txt8.getText()));
ps.executeUpdate();
JOptionPane.showMessageDialog(this,"Flight Successfully Added");
}
catch(Exception ex)
{
JOptionPane.showMessageDialog(this, ex.getMessage());
}
}
private void btn2ActionPerformed(java.awt.event.ActionEvent evt) {
txt1.setText(null);
txt2.setText(null);
txt3.setText(null);
txt4.setText(null);
txt5.setText(null);
txt6.setText(null);
txt7.setText(null);
txt8.setText(null);
56
}
public static void main(String args[]) {
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new Flightmaster().setVisible(true);
}
});
}
// Variables declaration - do not modify
private javax.swing.JButton btn1;
private javax.swing.JButton btn2;
private javax.swing.JComboBox cbox1;
private javax.swing.JComboBox cbox2;
private javax.swing.JLabel jLabel1;
private javax.swing.JLabel jLabel2;
private javax.swing.JLabel jLabel3;
private javax.swing.JLabel jLabel4;
private javax.swing.JLabel jLabel5;
private javax.swing.JLabel jLabel6;
private javax.swing.JLabel jLabel7;
private javax.swing.JLabel jLabel8;
private javax.swing.JLabel jLabel9;
private javax.swing.JPanel jPanel1;
57
conn();
add();
}
void add()
{
cbox1.addItem("Select Gender");
cbox1.addItem("Male");
cbox1.addItem("Female");
cbox3.addItem("Select City");
cbox3.addItem("NEW DELHI");
cbox3.addItem("MUMBAI");
cbox3.addItem("LUCKNOW");
cbox3.addItem("KANPUR");
cbox3.addItem("KOLKATTA");
cbox3.addItem("CHENNAI");
cbox3.addItem("BANGLORE");
cbox3.addItem("HYDRABAD");
cbox3.addItem("GOA");
cbox4.addItem("Select City");
cbox4.addItem("NEW DELHI");
cbox4.addItem("MUMBAI");
cbox4.addItem("LUCKNOW");
cbox4.addItem("KANPUR");
cbox4.addItem("KOLKATTA");
cbox4.addItem("CHENNAI");
cbox4.addItem("BANGLORE");
cbox4.addItem("HYDRABAD");
cbox4.addItem("GOA");
}
void conn()
{
try
{
Class.forName("oracle.jdbc.driver.OracleDriver");
59
Connection con =
DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:XE","air","air
");
}
catch(Exception ex)
{
JOptionPane.showMessageDialog(this, ex.getMessage());
}
}
private void cbox4ItemStateChanged(java.awt.event.ItemEvent evt) {
try
{
DefaultListModel mod=new DefaultListModel();
list1.setModel(mod);
String s="select * from Flight where source=? and destination=?";
ps=con.prepareStatement(s);
ps.setString(1,cbox3.getSelectedItem().toString());
ps.setString(2,cbox4.getSelectedItem().toString());
rs=ps.executeQuery();
while(rs.next())
{
mod.addElement(rs.getString("F_name"));
}
}
catch(Exception ex)
{
// JOptionPane.showMessageDialog(this, ex.getMessage());
}
}
private void list1ValueChanged(javax.swing.event.ListSelectionEvent evt) {
try
{
//JOptionPane.showMessageDialog(this, date);
ResultSet rs1;
60
Flight
where
txt1.setText(String.valueOf(tid));
txt13.setText(String.valueOf(tid1));
}
catch(Exception ex)
{
//JOptionPane.showMessageDialog(this, ex.getMessage());
}
}
private void cbox2ActionPerformed(java.awt.event.ActionEvent evt) {
}
private void cbox2ItemStateChanged(java.awt.event.ItemEvent evt) {
try
{
String f="Executive";
ResultSet rs2=null;
String s="select * from Fare where F_no=?";
ps=con.prepareStatement(s);
ps.setString(1,txt2.getText());
rs2=ps.executeQuery();
rs2.next();
if(f.equals(cbox2.getSelectedItem()))
{
txt14.setText(rs2.getString("EX_Class_Fare"));
}
else
{
txt14.setText(rs2.getString("B_Class_Fare"));
}
}
catch(Exception ex)
{
JOptionPane.showMessageDialog(this,ex.getMessage());
}
62
}
private void btn1ActionPerformed(java.awt.event.ActionEvent evt) {
try
{ Calendar d=Calendar.getInstance();
Calendar c=Calendar.getInstance();
int mon=Integer.parseInt(cbox6.getSelectedItem().toString());
mon--;
d.set(Integer.parseInt(cbox7.getSelectedItem().toString()),mon,Integer.parseInt(
cbox5.getSelectedItem().toString()));
date=cbox5.getSelectedItem().toString()+"/"+cbox6.getSelectedItem().toString()
+"/"+cbox7.getSelectedItem().toString();
c.set(c.get(Calendar.YEAR),c.get(Calendar.MONTH),c.get(Calendar.DATE));
if(d.after(c)||d.equals(c))
{
ResultSet rs3;
String s="insert into Ticket values(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)";
ps=con.prepareStatement(s);
ps.setString(1,txt1.getText());
ps.setString(2,txt2.getText());
ps.setString(3,txt3.getText());
ps.setString(4,txt4.getText());
ps.setString(5,txt5.getText());
ps.setString(6,date);
ps.setString(7,cbox2.getSelectedItem().toString());
ps.setString(8,txt8.getText());
ps.setString(9,txt9.getText());
ps.setString(10,cbox1.getSelectedItem().toString());
ps.setString(11,txt10.getText());
ps.setString(12,txt11.getText());
ps.setString(13,txt12.getText());
ps.setString(14,txt13.getText());
ps.setString(15,txt14.getText());
63
ps.setString(16,"CONFIRMED");
ps.executeUpdate();
String v="Executive";
String w="select EX_Class,B_Class from Flight where F_no=?";
ps=con.prepareStatement(w);
ps.setString(1,txt2.getText());
rs3=ps.executeQuery();
rs3.next();
if(v.equals(cbox2.getSelectedItem()))
{
f1=rs3.getInt("EX_Class");
f2=rs3.getInt("B_Class");
f1--;
}
else
{
f1=rs3.getInt("EX_Class");
f2=rs3.getInt("B_Class");
f2--;
}
String u="update Flight set EX_Class=?,B_Class=? where F_no=?";
ps=con.prepareStatement(u);
ps.setInt(1, f1);
ps.setInt(2, f2);
ps.setString(3,txt2.getText());
ps.executeUpdate();
JOptionPane.showMessageDialog(this,"Flight Successfully Booked");
}
else
{
JOptionPane.showMessageDialog(this,"Invalid Date Insert Valid
Date");
}
}
catch(Exception ex)
64
{
JOptionPane.showMessageDialog(this, ex.getMessage());
}
}
private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {
txt1.setText(null);
txt2.setText(null);
txt3.setText(null);
txt4.setText(null);
txt5.setText(null);
txt8.setText(null);
txt9.setText(null);
txt10.setText(null);
txt11.setText(null);
txt12.setText(null);
txt13.setText(null);
txt14.setText(null);
}
public static void main(String args[]) {
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new Reservation().setVisible(true);
}
});
}
// Variables declaration - do not modify
private javax.swing.JButton btn1;
private javax.swing.JComboBox cbox1;
private javax.swing.JComboBox cbox2;
private javax.swing.JComboBox cbox3;
private javax.swing.JComboBox cbox4;
private javax.swing.JComboBox cbox5;
private javax.swing.JComboBox cbox6;
private javax.swing.JComboBox cbox7;
65
{
JOptionPane.showMessageDialog(this,ex.getMessage());
}
}
private void btnpActionPerformed(java.awt.event.ActionEvent evt) {
try
{
String s="select * from Ticket where Ticket_no=?";
ps=con.prepareStatement(s);
ps.setString(1,txt1.getText());
rs=ps.executeQuery();
rs.next();
txtq.setText(rs.getString("Flight_no"));
txt2.setText(rs.getString("Flight_name"));
txt3.setText(rs.getString("nm"));
txt4.setText(rs.getString("source"));
txt5.setText(rs.getString("destination"));
txt6.setText(rs.getString("date"));
txt7.setText(rs.getString("class"));
txt8.setText(rs.getString("seat_no"));
txt9.setText(rs.getString("Fare"));
txt10.setText(rs.getString("status_of_ticket"));
r=Float.parseFloat(txt9.getText());
t=r*25.0f/100.0f;
rf=r-t;
}
catch(Exception ex)
{
JOptionPane.showMessageDialog(this,"Enter Valid Ticket Number");
}
}
private void btn1ActionPerformed(java.awt.event.ActionEvent evt) {
try
{
68
ResultSet rs1;
String s="insert into cancel values(?,?,?,?,?,?,?,?,?,?,?)";
ps=con.prepareStatement(s);
ps.setString(1,txtq.getText());
ps.setString(2,txt2.getText());
ps.setString(3,txt3.getText());
ps.setString(4,txt4.getText());
ps.setString(5,txt5.getText());
ps.setString(6,txt6.getText());
ps.setString(7,txt7.getText());
ps.setString(8,txt8.getText());
ps.setString(9,txt9.getText());
ps.setString(10,"CANCELLED");
ps.setString(11,String.valueOf(rf));
ps.executeUpdate();
String e="Executive";
String u="select EX_Class,B_Class from Flight where F_no=?";
ps=con.prepareStatement(u);
ps.setString(1,txtq.getText());
rs1=ps.executeQuery();
rs1.next();
if(e.equals(txt7.getText()))
{
cl=rs1.getInt("EX_Class");
cl++;
String v="update Flight set EX_Class=? where F_no=?";
ps=con.prepareStatement(v);
ps.setInt(1, cl);
ps.setString(2,txtq.getText());
ps.executeUpdate();
}
else
{
c2=rs1.getInt("B_Class");
c2++;
69
71
Output Screens
Splash Screen
72
Login Screen
73
Main Menu
74
75
76
77
78
79
80
81
List Of Flights
82
List Of Bookings
83
List Of Cancellation
84
85
Scope
Reusability:
Reusability is possible as and when we require in this application.
We can update it next version. Reusable software reduces design, coding and
testing cost by amortizing effort over several designs. Reducing the amount of
code also simplifies understanding, which increases the likelihood that the code
is correct. We follow up both types of reusability: Sharing of newly written code
within a project and reuse of previously written code on new projects.
Extensibility:
Robustness:
Its method is robust if it does not fail even if it receives improper
parameters. There are some facilities like Protect against errors, Optimize after
the program runs, validating arguments and Avoid predefined limits.
Understandability:
A method is understandable if someone other than the creator of
the method can understand the code (as well as the creator after a time lapse).
We use the method, which small and coherent helps to accomplish this.
Cost-effectiveness:
Its cost is under the budget and make within given time
period. It is desirable to aim for a system with a minimum cost subject to the
condition that it must satisfy all the requirements.
Scope of this document is to put down the requirements, clearly identifying the
information needed by the user, the source of the information and outputs
expected from the system.
86
Testing
Software Testing is the process of executing software in a controlled manner, in
order to answer the question - Does the software behave as specified?. Software
testing is often used in association with the terms verification and validation.
Validation is the checking or testing of items, includes software, for
conformance and consistency with an associated specification. Software testing
is just one kind of verification, which also uses techniques such as reviews,
analysis, inspections, and walkthroughs. Validation is the process of checking
that what has been specified is what the user actually wanted.
Testing is a set of activity that can be planned in advanced and conducted
systematically. Testing begins at the module level and work towards the
integration of entire computers based system. Nothing is complete without
testing, as it vital success of the system testing objectives, there are several rules
that can serve as testing objectives. They are
87
Test for correctness are supposed to verify that a program does exactly what it
was designed to do. This is much more difficult than it may at first appear,
especially for large programs.
Testing Objective:
The following are the testing objectives:
-Testing is a process of executing a program with the intent of finding an error.
-A good test case is one that has a high probability of finding an as-yetundiscovered error
-A successful test is one that uncovers an as yet undiscovered error.
Testability:
Software Testability is simply how easily (a computer program can be tested).
The Following characteristics are considered that lead to testable software.
-Operability: The better it works, the more efficiently it can be tested.
-Observability: What you see is what you test.
-Controllability: The better we can control the software, the more the Testing
can be automated and optimized.
-Decomposability: By controlling the scope of testing, we can more quickly
Isolate problems and perform smarter retesting.
-Simplicity: The less there is to test, the more quickly we can test it.
-Stability: The fewer the changes, the fewer the disruptions to testing.
-Understandability: the more information we have, the smarter we will test.
88
TEST PLAN
A test plan implies a series of desired course of action to be followed in
accomplishing various testing methods. The Test Plan acts as a blue print for the
action that is to be followed. The software engineers create a computer program,
its documentation and related data structures. The software developers is always
responsible for testing the individual units of the programs, ensuring that each
performs the function for which it was designed. There is an independent test
group (ITG) which is to remove the inherent problems associated with letting
the builder to test the thing that has been built. The specific objectives of testing
should be stated in measurable terms. So that the mean time to failure, the cost
to find and fix the defects, remaining defect density or frequency of occurrence
and test work-hours per regression test all should be stated within the test plan.
The levels of testing include:
Unit testing
Integration Testing
Data validation Testing
Output Testing
UNIT TESTING
Unit testing focuses verification effort on the smallest unit of software design
the software component or module. Using the component level design
description as a guide, important control paths are tested to uncover errors
within the boundary of the module. The relative complexity of tests and
uncovered scope established for unit testing. The unit testing is white-box
oriented, and step can be conducted in parallel for multiple components. The
modular interface is tested to ensure that information properly flows into and out
of the program unit under test. The local data structure is examined to ensure
that data stored temporarily maintains its integrity during all steps in an
algorithms execution. Boundary conditions are tested to ensure that all
statements in a module have been executed at least once. Finally, all error
handling paths are tested.
89
Tests of data flow across a module interface are required before any other test
is initiated. If data do not enter and exit properly, all other tests are moot.
Selective testing of execution paths is an essential task during the unit test. Good
design dictates that error conditions be anticipated and error handling paths set
up to reroute or cleanly terminate processing when an error does occur.
Boundary testing is the last task of unit testing step. Software often fails at its
boundaries.
INTEGRATION TESTING
After unit testing in Sell-Soft System all the modules were integrated to test
for any inconsistencies in the interfaces. Moreover differences in program
structures were removed and a unique program structure was evolved.
90
This is the final step in testing. In this the entire system was tested as a
whole with all forms, code, modules and class modules. This form of testing is
popularly known as Black Box testing or System tests.
Black Box testing method focuses on the functional requirements of the
software. That is, Black Box testing enables the software engineer to derive sets
of input conditions that will fully exercise all functional requirements for a
program.
Black Box testing attempts to find errors in the following categories;
incorrect or missing functions, interface errors, errors in data structures or
external data access, performance errors and initialization errors and termination
errors.
The system considered is tested for user acceptance; here it should satisfy the
firms need. The software should keep in touch with perspective system; user at
the time of developing and making changes whenever required. This done with
respect to the following points
which test data errors are again uncovered and corrected by using above testing
steps and corrections are also noted for future use.
Validation Checking:
At the culmination of integration testing, software is completely assembled as a
package; interfacing errors have been uncovered and corrected, and a final series
of software test-validation checks may begin. Validation can be defined in many
ways, but a simple definition (Albeit Harsh) is that validation succeeds when
software functions in a manner that can be reasonably expected by a customer.
Software validation is achieved through a series of black-box tests to be
conducted and a test procedure defines specific test cases that will be used in
attempt to uncover errors in conformity with requirements. Both the plan and
procedure are designed to ensure that all functional requirements are satisfied;
all performance requirements are achieved; documentation is correct and human
Engineered and other requirements are met. Once the application was made
free of all logical and interface errors , inputting dummy data to ensure that the
software developed satisfied all the requirements of the user did validation
checks .The data are created with the intent of determining whether the system
will process them correctly .
92
System Security
Enterprise businesses and government agencies around the world face the
certainty of losing sensitive data from a lost laptop, removable media or other
plug-and-play storage device. This drives the need for a complete data
protection solution that secures data on all common platforms, deploys easily,
scales to any size organization and meets strict compliance requirements related
to privacy laws and regulations.
Check Point Endpoint Security solutions provide data protection for laptops,
PCs, removable media and mobile devices. Our independently certified data
security products ensure that our enterprise, government and law enforcement
customers remain in compliance with regulatory standards. By leveraging a
strong and efficient blend of full disk encryption, access control, removable
media encryption and port management, Check Point Endpoint Security
solutions deliver comprehensive data security
Authentication security:
To make information available to those who need it and who can be trusted
with it, organizations use authentication and authorization. Authentication is
proving that a user is whom he or she claims to be. That proof may involve
something the user knows (such as a password), something the user has (such as
a 'smartcard'), or something about the user that proves the person's identity (such
as a fingerprint). Authorization is the act of determining whether a particular
user (or computer system) has the right to carry out a certain activity, such as
reading a file or running a program. Authentication and authorization go hand in
hand. Users must be authenticated before carrying out the activity they are
authorized to perform. Security is strong when the means of authentication
cannot later be refuted the user cannot later deny that he or she performed the
activity. This is known as no repudiation.
93
Java security:
Javas security model is one of the languages key architectural features that
make it an appropriate technology for networked environments. Security is
important because networks provide a potential avenue of attack to any
computer hooked to them. This concern becomes especially strong in an
environment in which software is downloaded across the network and executed
locally, as is done with java applets, for example. Because the class files for an
applet are automatically downloaded when a user goes to the containing web
page in a browser, it is likely that a user will encounter applets from untrusted
sources. Without any security, this would be a convenient way to spread viruses.
Thus, java securities mechanisms help make java suitable of networks because
they establish a needed trust in the safety of network-mobile code.
94
Implementation
Implementation is the stage of the project where the
theoretical design is turned into a working system. It can be considered to be the
most crucial stage in achieving a successful new system gaining the users
confidence that the new system will work and will be effective and accurate. It
is primarily concerned with user training and documentation. Conversion
usually takes place about the same time the user is being trained or later.
Implementation simply means convening a new system design into operation,
which is the process of converting a new revised system design into an
operational one.
Implementation is the stage of the project where the theoretical design is
tuned into a working system. At this stage the main work load, the greatest
upheaval and the major impact on the existing system shifts to the user
department.
Implementation includes all those activities that take place to convert
from the existing system to the new system. The new system may be a totally
new, replacing an existing manual or automated system or it may be a
modification to an existing system. Proper implementation is essential to
provide a reliable system to meet organization requirements. The process of
putting the developed system in actual use is called system implementation. This
includes all those activities that take place to convert from the old system to the
new system. The system can be implemented only after through testing is done
and if it is found to be working according to the specifications. The system
personnel check the feasibility of the system. The more complex the system
being implemented, the more involved will be the system analysis and design
effort required to implement the three main aspects: education and training,
system testing and changeover. The implementation state involves the following
tasks:
Careful planning.
Investigation of system and constraints.
95
screen design type of help on the screen, type of errors while entering the data,
the corresponding validation check at each entry and the ways to correct the date
entered. It should then cover information needed by the specific user/ group to
use the system or part of the system while imparting the training of the program
on the application. This training may be different across different user groups
and across different levels of hierarchy.
Operational Document
Once the implementation plan is decided, it is essential that the user of the
system is made familiar and comfortable with the environment. Education
involves right atmosphere and motivating the user. A documentation providing
the whole operations of the system is being developed in such a way that the
user can work with it in well consistent way. The system is developed user
friendly so that the user can work the system from the tips given in the
application itself. Useful tip and guidance is given inside the application itself to
help the user. Users have to be made aware that what can be achieved with the
new system and how it increases the performance of the system. The user of the
system should be given a general idea of the system before he uses the system.
System Maintenance
Maintenance is the enigma of system development. The maintenance
phase of the software cycle is the time in which a software product performs
useful work. After a system is successfully implemented, it should be
maintained in a proper manner.
System maintenance is an important aspect in the software development life
cycle. The need for system maintenance is for it to make adaptable to the
changes in the system environment. Software maintenance is of course, far more
than "Finding Mistakes". Maintenance may be defined by describing four
activities that are undertaken after a program is released for use.
97
Conclusion
The system is used for daily activities such as booking, non delivery, out return,
company details, hub rates, and pickup centers. It is very difficult to do this
process manually. Hence it is recommended to computerize the process by
developing the relative software as the world is turning into information and
technology; computerization becomes necessity in all walks of life.
The various benefits that can be realized from this project are:
98
Bibliography
Books
1.
2.
3.
4.
5.
6.
Web Sites:
www.google.com
www.jakarta.apache.org
www.jdk.com
www.en.wikipedia.org
www.java.com
99