Vous êtes sur la page 1sur 47

AIR WAYS

(Submitted in partial fulfillment for the award of Bachelor of Technology)


(B.Tech )Degree in Computer Engineering

Asha Chauhan Mr. Deepak


Arya
C.S.E. (Vth SEM) H.O.D.
Roll.No.-08-CSE-05 CSE Deptt.

Page No. 1
AIR WAYS

Contents

Page No. 2
AIR WAYS

CONTENTS

 Project Title

 Acknowledgement

 Introduction

 System Analysis

 Software & Hardware Specifications

 Front-End & Back-End Used

 System Design

 System Implementation

 Feasibility Study

 Coding

 Input/Output Forms

 Future Scope of Project

 References

ACKNOWLEDGEMENT

Page No. 3
AIR WAYS

It gives me immense pleasure to express my sincerest thanks


and gratitude to all those with whose guidance, co-operation
and sincerest advice, I have been able to complete my
project.

My First and foremost thanks is to MR.LALIT SHARMA who


has contributed a lot in completing my project by providing
step by step guidelines and awaring me about new
things/tools to be used in project to enhance it as per the
requirements.

It is prime duty to thank Mr.Deepak Arya HOD of Computer


Science Department for providing such a nourishing
environment in the college.

Last but not least, I like to thank my family members and


friends who always stood behind me and encourage me in
achieving my target.

ASHA CHAUHAN
B.Tech Vth Sem.
(Computer Science)

Page No. 4
AIR WAYS

INTRODUCTION

This project has been developed to computerize the Airways System

of Air India Airlines.

Page No. 5
AIR WAYS

SYSTEM ANALYSIS

It is a detailed study of the various operations performed by the system


and their relationship within and outside of the system. A key question is
– what must be done to solve the problem? One aspect of analysis is
defining the boundaries of the system and determining whether or not a
candidate system should consider other related systems. During
analysis, data are collected on available files, decision points, and
transactions handled by the present system. We shall learn about some
logical system models and tools that are used in analysis. It requires
special skills and sensitivity to the subjects being interviewed. Bias in
data collection and interpretation can be problem. Training, experience
and common sense are required for collection of the information needed
to do the analysis. Once analysis is completed the analyst has a firm
understanding of what is to be done. The next step is to decide how the
problem might be solved. Thus, in the systems design, we move from
the logical to the physical aspects of the life cycle.
Fact-Finding
Fact-finding means learning as much as possible about the present
system.
Fact-finding is the formal process of using research, interviews,
questionnaires, sampling and other techniques to collect information
about systems, requirements and preferences. It is also called
information gathering or data collections. Tools, such as data and
process models, document facts, and conclusions are drawn from facts.
If you can’t collect the facts, you can’t use the tools. Fact - finding skills
must be learned and practiced.
There are many occasions for fact– finding during the systems
development life cycle. However, fact-finding is most crucial to the
system planning and systems analysis phases. It is during these phases
that the analysis learns about the vocabulary, problems, opportunities
constraints, requirements, and priorities of a business and a system.
Fact-finding is also used during the systems design and support phases,
but to a lesser extent. During system design, fact – finding becomes
technical as the analyst attempts to learn more about the technology
selected for the new system. During the systems support phase, fact-
finding is

Page No. 6
AIR WAYS

Important in determining that a system has decayed to a point


where the system needs to be redeveloped.

Review of Written Documents


When available, all documentation on data carriers (forms, records,
reports, manuals, etc) is organized and evaluated. Included in
procedures manuals are the requirements of the system, which helps in
determining to what extent they are met by the present system.
Unfortunately, most manuals are not up to data or may not be readable.
Day-to-day problems may have forced changes that are not reflected in
the manual. Furthermore, people have to tendency to ignore procedures
and find shortcuts as long as the outcome is satisfactory.
Regarding existing forms, the analyst need to find out how they are filled
out, how useful they are to the user (in our scenario the customer) what
changes need to be made and how easy they are to read. The forms
used in our safe deposit case.

On-Site Observations
Another fact – finding method used by the systems analyst is on-site or
direct observation. The analyst’s role is that of information

Seeks. One purpose of on-site observation is to get as close as possible


to the “real” system being studied. As an observes, the analyst follows a
set of rulers. While making observations, he/she

Is more likely to listen than talk, and to listen with interest when
information is posed on he/she avoids giving advice, does not pass
Moral judgment on what is observed does not argue with the user staff
and does not show under friendliness toward one but not others.

Page No. 7
AIR WAYS

PLATFORM USED

HARDWARE REQUIRED 

 Pentium compatible Computer with hard disk i.e. PC/XT or PC/ATX


 Personal Computer

PLATFORM 
 Windows 95
 Windows 98
 Windows NT
 Windows 2000 Server
 Windows XP
 UNIX,LINUX

This software is developed using Microsoft Windows XP


(Professional) as System software and is tested to be executed on all the
operating systems given above.

Page No. 8
AIR WAYS

FRONT & BACK END USED

 Operating System :- Windows98, 2000, XP

 Front End Tools :- JAVA 1.3 or higher version

 Back End Tools :- SQL

 S/W principles used: - In preparing this project JAVA 1.3 or higher


version is used as front-end and SQL is used as back-end tool.

Page No. 9
AIR WAYS

SYSTEM DESIGN

The design of a system uses the Functional Specifications as basis and


produces the details that state how a system meets the requirements
identified during systems analysis. The design process should take care
of the following:-

 Identification of reports and outputs the new System should


produce.
 Scrutinize the data present on each report/output.
 Sketch the form or display as expected to appear at the end of
completion of the system. This may be done on paper or on a
computer display, using one of the automated system design tool
available.
 Description of data to be input calculated or stored.
 Individual data items and calculation procedures are written in
detail
 The procedures written should tell how to process the data and
produce the output.

 The Document produced at the end of this activity is called the


“Design Specification”. This document should have charts, tables
and special symbols to portray the design.

Page No. 10
AIR WAYS

SYSTEM IMPLEMETATION

The implementation of a system specifies as how the system is


deployed in the target location. The implementation is done by the team
of experts who guide each step to the support personnels. Following are
the main steps towards successfull implementation of the final solution.

 The software has been developed by the programmers.

 After the development phase has been completed, the system

 Testing experts test the entire system step by step.

 After the testing process, the sytem has been tested in real
Environment for any possible bugs.

 When the testing phase is completed successfully, the


implementation begins.

 In the implementation phase, the solution is deployed in primises


of the customers.

 The successful implementation also yields towards the training of


employees of target environment

Page No. 11
AIR WAYS

Feasibility Study

Depending on the results of the initial investigation, the survey is

expanded to a more detailed feasibility study. As we shall learn, a

feasibility study is a test of a system proposal according to its

workability impact on the organization, ability to meet user needs,

and effective use of resources. It focuses on there major questions:

1) What are the user’s demonstrable needs and how does a

candidate system meet them?

2) What resources are available for given candidate

systems? Is the problem worth solving?

3) What is the likely impact of the candidate system on the

organization? How will does it fit within the organization’s

master MIS plan?

Each of these questions must be answered carefully. They revolve

around investigation and evaluation of the problem, identification

and description of candidate systems, specification of performance

and the cost of each system, and final selection of the best system.

The objective of a feasibility study is not to solve the problem but

to acquire a sense of its scope. During the study, the problem

definition is crystallized and aspects of the problem to be included

in the system are determined. Consequently, costs and benefits

are estimated with greater accuracy at this stage.

Page No. 12
AIR WAYS

The result of the feasibility study is a formal proposal. This is

simply a report a formal document detailing the nature and scope

of the proposed solution. The proposal summarizes what is known

and what is going to be done. It consists of the following.

1. Statement of the Problem:– a carefully worded statement of


the problem that led to analysis.

2. Summary of Findings and Recommendations:– a list of the


major findings and recommendations of the study. It is ideal for

the user who required quick access to the results of the

analysis of the system under study. Conclusions are stated,

followed by a list of the recommendations and a justification for

them.

3. Details of Findings:– An outline of the methods and


procedures undertaken by the existing system, followed by

coverage of objectives & procedures of the candidate system.

Included are also discussions of output reports, file structures,

and costs and benefits of the candidate system.

Page No. 13
AIR WAYS

CODING
import java .awt.*;
import java.awt.event.*;
import java.sql.*;
class ashproject extends Frame implements ActionListener,WindowListener
{
Panel p1;
MenuBar mb;
Menu m1,m2,x6,x10;
MenuItem x1,x2,x3,x4,x5,x7,x8,x9,x11,x12;
Label l1,l3;
Button b1;
public ashproject()
{
super("AIRWAY");
p1=new Panel();
add(p1);
mb=new MenuBar();
setMenuBar(mb);
m1=new Menu("DETAIL INFORMATION");
mb.add(m1);
m1.addActionListener(this);
m2=new Menu("REPORT");
mb.add(m2);
x1=new MenuItem("Flight");
m1.add(x1);
x1.addActionListener(this);
x2=new MenuItem("Reservation");
m1.add(x2);
x2.addActionListener(this);
x3=new MenuItem("Cancellation");
m1.add(x3);
x3.addActionListener(this);
x4=new MenuItem("record");
m1.add(x4);
x4.addActionListener(this);
x5=new MenuItem("Exit");
m1.add(x5);
x5.addActionListener(this);
x6=new Menu("RECORD DETAIL");
m2.add(x6);
x7=new MenuItem("Flight DETAIL");
x6.add(x7);
x7.addActionListener(this);
x8=new MenuItem("RESERVATION DETAIL");

Page No. 14
AIR WAYS

x6.add(x8);
x8.addActionListener(this);
x9=new MenuItem("SEAT AVILABILTY");
m2.add(x9);
x9.addActionListener(this);
x10=new Menu("FARE-DETAIL");
mb.add(x10);
x11=new MenuItem("Add Fare");
x10.add(x11);
x11.addActionListener(this);
x12=new MenuItem("Show Fare");
x10.add(x12);
x12.addActionListener(this);
GridLayout gg = new GridLayout(3,2);
p1.setLayout(gg);
l1=new Label("WELCOME IN OUR PROJECT");
p1.add(l1);
l3=new Label("WE WISH THAT YOUR JOURNAY MAY BE SUCCESFUL");
p1.add(l3);
b1=new Button("Close");
p1.add(b1);
b1.addActionListener(this);
addWindowListener(this);
p1.setBackground(Color.white);
}
public void actionPerformed(ActionEvent e)
{
try
{
if(e.getSource()==x1)
{
flight f1=new flight();
f1.setSize(400,400);
f1.setVisible(true);
}
if(e.getSource()==x2)
{
reservation re = new reservation();
re.setSize(400,400);
re.setVisible(true);
}
if(e.getSource()==x3)
{
cancellation ra = new cancellation();
ra.setSize(400,400);
ra.setVisible(true);
}
if(e.getSource()==x4)
{
record rav = new record();

Page No. 15
AIR WAYS

rav.setSize(400,400);
rav.setVisible(true);
}
if(e.getSource()==x5)
{
setVisible(false);
}
if(e.getSource()==x7)
{
flframe flight=new flframe();
flight.setSize(400,400); flight.setVisible(true);
}
if(e.getSource()==x8)
{
res fl=new res();
fl.setSize(600,500); fl.setVisible(true);
}
if(e.getSource()==x9)
{
seat fl1=new seat();
fl1.setSize(600,500); fl1.setVisible(true);
}
if(e.getSource()==x11)
{
addfare ravi=new addfare();
ravi.setSize(600,500); ravi.setVisible(true);
}
if(e.getSource()==x12)
{
showfare ravi1=new showfare();
ravi1.setSize(600,500); ravi1.setVisible(true);
}

if(e.getSource()==b1)
{
setVisible(false);
dlg we= new dlg(new Frame(),"Message","Thanks for visit");
we.setSize(150,150);
we.setVisible(true);
}
}
catch(Exception k)
{
}
}
public void windowClosed(WindowEvent w)
{
setVisible(false);
}
public void windowOpened(WindowEvent w)

Page No. 16
AIR WAYS

{
}
public void windowClosing(WindowEvent w)
{
setVisible(false);
}
public void windowOpening(WindowEvent w)
{
}
public void windowActivated(WindowEvent w)
{}
public void windowDeactivated(WindowEvent w)
{
}
public void windowIconified(WindowEvent w)
{
}
public void windowDeiconified(WindowEvent w)
{}

class flight extends Frame implements ActionListener,WindowListener


{
Panel p1;
Label l1,l2,l3,l4,l5,l6,l7,l8,l9,l10;
TextField t1,t2,t3,t4,t5,t6,t7,t8,t9,t10;
Button b1,b2;
Choice d1,d2;
PreparedStatement s1;
Connection c1;
public flight()
{
super("NEW FLIGHT");
p1=new Panel();
add(p1);
GridLayout gg = new GridLayout (13,2);
p1.setLayout(gg);
l1=new Label("Enter the serialnumber");
p1.add(l1);
t1=new TextField(6);
p1.add(t1);
l2=new Label("Enter the flightnumber");
p1.add(l2);
t2=new TextField(6);
p1.add(t2);
l3=new Label("Enter the Source");
p1.add(l3);
t3=new TextField(6);
p1.add(t3);
l4=new Label("Enter the Destination");
p1.add(l4);

Page No. 17
AIR WAYS

t4=new TextField(6);
p1.add(t4);
l5=new Label("Enter the Fare");
p1.add(l5);
t5=new TextField(6);
p1.add(t5);
l6=new Label("Enter the Category");
p1.add(l6);
d1 = new Choice();
p1.add(d1);
d1.add("Domestic");
d1.add("International");
l7=new Label("Enter the Totalseat");
p1.add(l7);
t7=new TextField(6);
p1.add(t7);
l8=new Label("Enter the Frequency");
p1.add(l8);
d2 = new Choice();
p1.add(d2);
d2.add("DAILY");
d2.add("WEEKLY");
d2.add("BYWEEKLY");
l9=new Label("Enter Departure of Time");
p1.add(l9);
t9=new TextField(6);
p1.add(t9);
b1=new Button("OK");
p1.add(b1);
b1.addActionListener(this);
b2=new Button("Close");
p1.add(b2);
b2.addActionListener(this);
addWindowListener(this);
p1.setBackground(Color.red);
}
public void actionPerformed(ActionEvent e)
{
try
{
if(e.getSource()==b1)
{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
c1=DriverManager.getConnection("jdbc:odbc:subash","scott","tiger");
s1=c1.prepareStatement("insert into flight1 values(?,?,?,?,?,?,?,?,?)");
s1.setInt(1,Integer.parseInt(t1.getText()));
s1.setInt(2,Integer.parseInt(t2.getText()));
s1.setString(3,String.valueOf(t3.getText()));
s1.setString(4,String.valueOf(t4.getText()));
s1.setFloat(5,Float.parseFloat(t5.getText()));

Page No. 18
AIR WAYS

s1.setString(6,d1.getSelectedItem());
s1.setInt(7,Integer.parseInt(t7.getText()));
s1.setString(8,d2.getSelectedItem());
s1.setString(9,String.valueOf(t9.getText()));
s1.executeUpdate();
dlg d1=new dlg(new Frame(),"Message","Your Record are inserted");
d1.setSize(150,200);
d1.setVisible(true);
}
if(e.getSource()==b2)
{
setVisible(false);
}
}
catch(Exception k)
{
dlg ra= new dlg(new Frame(),"Error","your record are not inserted");
ra.setSize(150,150);ra.setVisible(true);
System.out.println("ERROR:"+k);
}
}
public void windowClosed(WindowEvent w)
{
setVisible(false);
}
public void windowOpened(WindowEvent w)
{
}
public void windowClosing(WindowEvent w)
{
setVisible(false);
}
public void windowOpening(WindowEvent w)
{
}
public void windowActivated(WindowEvent w)
{}
public void windowDeactivated(WindowEvent w)
{
}
public void windowIconified(WindowEvent w)
{
}
public void windowDeiconified(WindowEvent w)
{}
}
class reservation extends Frame implements
ActionListener,WindowListener
{
Panel p1;

Page No. 19
AIR WAYS

Label l1,l2,l3,l4,l5,l6,l7,l8,l9,l10,l11,l12;
TextField t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12;
Button b1,b2;
PreparedStatement s1;
Connection c1;
public reservation()
{
super("RESERVATION");
p1=new Panel();
add(p1);
GridLayout gg = new GridLayout (16,2);
p1.setLayout(gg);
l1=new Label("Enter the serialnumber");
p1.add(l1);
t1=new TextField(6);
p1.add(t1);
l2=new Label("Enter the Passportnumber");
p1.add(l2);
t2=new TextField(6);
p1.add(t2);

l3=new Label("Enter the customername");


p1.add(l3);
t3=new TextField(6);
p1.add(t3);
l4=new Label("Enter the address");
p1.add(l4);
t4=new TextField(6);
p1.add(t4);
l5=new Label("Enter the phonenumber");
p1.add(l5);
t5=new TextField(6);
p1.add(t5);
l6=new Label("Enter the source");
p1.add(l6);
t6=new TextField(6);
p1.add(t6);
l7=new Label("Enter the destination");
p1.add(l7);
t7=new TextField(6);
p1.add(t7);
l8=new Label("Enter the journey date");
p1.add(l8);
t8=new TextField(6);
p1.add(t8);
l9=new Label("Enter the Departure of Time");
p1.add(l9);
t9=new TextField(5);
p1.add(t9);
l10=new Label("Enter the flightnumber");

Page No. 20
AIR WAYS

p1.add(l10);
t10=new TextField(5);
p1.add(t10);
l11=new Label("Enter the Seatnumber");
p1.add(l11);
t11=new TextField(6);
p1.add(t11);
l12=new Label("Enter the Totalprice");
p1.add(l12);
t12=new TextField(6);
p1.add(t12);
b1=new Button("OK");
p1.add(b1);
b1.addActionListener(this);
b2=new Button("Close");
p1.add(b2);
b2.addActionListener(this);
addWindowListener(this);
p1.setBackground(Color.red);
}
public void actionPerformed(ActionEvent e)
{
try
{
if(e.getSource()==b1)
{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
c1=DriverManager.getConnection("jdbc:odbc:sum","scott","tiger");
s1=c1.prepareStatement("insert into reservation1 values(?,?,?,?,?,?,?,?,?,?,?,?)");
s1.setInt(1,Integer.parseInt(t1.getText()));
s1.setInt(2,Integer.parseInt(t2.getText()));
s1.setString(3,String.valueOf(t3.getText()));
s1.setString(4,String.valueOf(t4.getText()));
s1.setInt(5,Integer.parseInt(t5.getText()));
s1.setString(6,String.valueOf(t6.getText()));
s1.setString(7,String.valueOf(t7.getText()));
s1.setString(8,String.valueOf(t8.getText()));
s1.setString(9,String.valueOf(t9.getText()));
s1.setInt(10,Integer.parseInt(t10.getText()));
s1.setInt(11,Integer.parseInt(t11.getText()));
s1.setInt(12,Integer.parseInt(t12.getText()));
s1.executeUpdate();
s1=c1.prepareStatement("update flight1 set totalseat=totalseat-1 where flightnumber=?");
s1.setInt(1,Integer.parseInt(t10.getText()));
s1.execute();
dlg d2=new dlg(new Frame(),"Message","Your Record is Inserted");
d2.setSize(150,200);
d2.setVisible(true);

Page No. 21
AIR WAYS

if(e.getSource()==b2)
{
setVisible(false);
}
}
catch(Exception k)
{
dlg vi= new dlg(new Frame(),"Error","your record is not inserted");
vi.setSize(150,150); vi.setVisible(true);
}
}
public void windowClosed(WindowEvent w)
{
setVisible(false);
}
public void windowOpened(WindowEvent w)
{
}
public void windowClosing(WindowEvent w)
{
setVisible(false);
}
public void windowOpening(WindowEvent w)
{
}
public void windowActivated(WindowEvent w)
{}
public void windowDeactivated(WindowEvent w)
{
}
public void windowIconified(WindowEvent w)
{
}
public void windowDeiconified(WindowEvent w)
{}
}
class cancellation extends Frame implements
ActionListener,WindowListener
{
Panel p1;
Label l1,l2,l3,l4,l5,l6,l7,l8,l9,l10,l11,l12;
TextField t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12;
Button b1,b2;
PreparedStatement s1;
Connection c1;
public cancellation()
{
super("CANCALLATION");
p1=new Panel();
add(p1);

Page No. 22
AIR WAYS

GridLayout gg = new GridLayout (16,2);


p1.setLayout(gg);
l1=new Label("Enter the serialnumber");
p1.add(l1);
t1=new TextField(6);
p1.add(t1);
l2=new Label("Enter the Passportnumber");
p1.add(l2);
t2=new TextField(6);
p1.add(t2);

l3=new Label("Enter the customername");


p1.add(l3);
t3=new TextField(6);
p1.add(t3);
l4=new Label("Enter the address");
p1.add(l4);
t4=new TextField(6);
p1.add(t4);
l5=new Label("Enter the phonenumber");
p1.add(l5);
t5=new TextField(6);
p1.add(t5);
l6=new Label("Enter the source");
p1.add(l6);
t6=new TextField(6);
p1.add(t6);
l7=new Label("Enter the destination");
p1.add(l7);
t7=new TextField(6);
p1.add(t7);
l8=new Label("Enter the journey date");
p1.add(l8);
t8=new TextField(6);
p1.add(t8);
l9=new Label("Enter the Departure of Time");
p1.add(l9);
t9=new TextField(5);
p1.add(t9);
l10=new Label("Enter the flightnumber");
p1.add(l10);
t10=new TextField(5);
p1.add(t10);
l11=new Label("Enter the Seatnumber");
p1.add(l11);
t11=new TextField(6);
p1.add(t11);
l12=new Label("Enter the Totalprice");
p1.add(l12);
t12=new TextField(6);

Page No. 23
AIR WAYS

p1.add(t12);

b1=new Button("OK");
p1.add(b1);
b1.addActionListener(this);
b2=new Button("Close");
p1.add(b2);
b2.addActionListener(this);
addWindowListener(this);
p1.setBackground(Color.red);
}
public void actionPerformed(ActionEvent e)
{
try
{
if(e.getSource()==b1)
{
Class .forName("sun.jdbc.odbc.JdbcOdbcDriver");
c1=DriverManager.getConnection("jdbc:odbc:sum","scott","tiger");
s1=c1.prepareStatement("delete from reservation1 where serialnumber=?");
s1.setInt(1,Integer.parseInt(t1.getText()));
s1.executeUpdate();
s1=c1.prepareStatement("update flight1 set totalseat= totalseat + 1 where flightnumber=?");
s1.setInt(1,Integer.parseInt(t10.getText()));
s1.executeUpdate();
dlg d3=new dlg(new Frame(),"Message","You Record is deleted");
d3.setSize(150,200);
d3.setVisible(true);

}
if(e.getSource()==b2)
{
setVisible(false);
}
}
catch(Exception k)
{
dlg vk= new dlg(new Frame(),"Error","your record is not deleted");
vk.setSize(150,150); vk.setVisible(true);
}
}
public void windowClosed(WindowEvent w)
{
setVisible(false);
}
public void windowOpened(WindowEvent w)
{
}
public void windowClosing(WindowEvent w)
{

Page No. 24
AIR WAYS

setVisible(false);
}
public void windowOpening(WindowEvent w)
{
}
public void windowActivated(WindowEvent w)
{}
public void windowDeactivated(WindowEvent w)
{
}
public void windowIconified(WindowEvent w)
{
}
public void windowDeiconified(WindowEvent w)
{}
}
class record extends Frame implements ActionListener,WindowListener
{
Panel p1;
Label l1,l2,l3,l4,l5,l6,l7,l8,l9,l10,l11,l12;
TextField t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12;
Button b1, b2, b3;
PreparedStatement s1;
Connection c1;
ResultSet r1;
public record()
{
super("RECORD");
p1=new Panel();
add(p1);
GridLayout gg = new GridLayout (16,2);
p1.setLayout(gg);
l1=new Label("Enter the serialnumber");
p1.add(l1);
t1=new TextField(6);
p1.add(t1);
l2=new Label("Enter the Passportnumber");
p1.add(l2);
t2=new TextField(6);
p1.add(t2);

l3=new Label("Enter the customername");


p1.add(l3);
t3=new TextField(6);
p1.add(t3);
l4=new Label("Enter the address");
p1.add(l4);
t4=new TextField(6);
p1.add(t4);
l5=new Label("Enter the phonenumber");

Page No. 25
AIR WAYS

p1.add(l5);
t5=new TextField(6);
p1.add(t5);
l6=new Label("Enter the source");
p1.add(l6);
t6=new TextField(6);
p1.add(t6);
l7=new Label("Enter the destination");
p1.add(l7);
t7=new TextField(6);
p1.add(t7);
l8=new Label("Enter the journey date");
p1.add(l8);
t8=new TextField(6);
p1.add(t8);
l9=new Label("Enter the Departure of Time");
p1.add(l9);
t9=new TextField(5);
p1.add(t9);
l10=new Label("Enter the flightnumber");
p1.add(l10);
t10=new TextField(5);
p1.add(t10);
l11=new Label("Enter the Seatnumber");
p1.add(l11);
t11=new TextField(6);
p1.add(t11);
l12=new Label("Enter the Totalprice");
p1.add(l12);
t12=new TextField(6);
p1.add(t12);

b1=new Button("OK");
p1.add(b1);
b1.addActionListener(this);
b2=new Button("Close");
p1.add(b2);
b2.addActionListener(this);
addWindowListener(this);
p1.setBackground(Color.red);
}
public void actionPerformed(ActionEvent e)
{
try
{
if(e.getSource()==b1)
{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
c1=DriverManager.getConnection("jdbc:odbc:sum","scott","tiger");
s1=c1.prepareStatement("select * from reservation1 where serialnumber = ?" );

Page No. 26
AIR WAYS

s1.setInt(1,Integer.parseInt(t1.getText()));
r1=s1.executeQuery();
r1.next();
t2.setText(String.valueOf(r1.getInt(2)));
t3.setText(r1.getString(3));
t4.setText(r1.getString(4));
t5.setText(String.valueOf(r1.getInt(5)));
t6.setText(r1.getString(6));
t7.setText(r1.getString(7));
t8.setText(r1.getString(8));
t9.setText(r1.getString(9));
t10.setText(String.valueOf(r1.getInt(10)));
t11.setText(String.valueOf(r1.getInt(11)));
t12.setText(String.valueOf(r1.getInt(12)));
dlg d4=new dlg(new Frame(),"Message","The Record are show");
d4.setSize(150,200);
d4.setVisible(true);
}
if(e.getSource()==b2)
{
setVisible(false);
}
}
catch(Exception k)
{
dlg ai= new dlg(new Frame(),"Error","your record is not inserted");
ai.setSize(150,150); ai.setVisible(true);
}
}
public void windowClosed(WindowEvent w)
{
setVisible(false);
}
public void windowOpened(WindowEvent w)
{
}
public void windowClosing(WindowEvent w)
{
setVisible(false);
}
public void windowOpening(WindowEvent w)
{
}
public void windowActivated(WindowEvent w)
{}
public void windowDeactivated(WindowEvent w)
{
}
public void windowIconified(WindowEvent w)
{

Page No. 27
AIR WAYS

public void windowDeiconified(WindowEvent w)


{}
}
public static void main(String s[])
{
ashproject sd= new ashproject();
sd.setSize(400,400);
sd.setVisible(true);
}
}
class flframe extends Frame implements ActionListener,WindowListener
{
Panel p11;
Label l1,l2,l3,l4,l5,l6,l7;
Label recdetail[];
Button b1,b2,b3,b4,b5,b6;
PreparedStatement s11;
Connection c11;
ResultSet r11; GridLayout gg1;
public flframe()
{
super("Flight Details"); p11=new Panel();
add(p11);
gg1=new GridLayout(15,6); p11.setLayout(gg1);
b1=new Button("Display"); p11.add(b1);
b1.addActionListener(this);
b2=new Button("Close"); p11.add(b2);
b2.addActionListener(this);
b3=new Button(" "); p11.add(b3);
b4=new Button(" "); p11.add(b4);
b5=new Button(" "); p11.add(b5);
b6=new Button(" "); p11.add(b6);
l1=new Label("Sr No");
l2=new Label("Flight No");
l3=new Label("source");
l4=new Label("destination");
l5=new Label("fare");
l6=new Label("category");
p11.add(l1);p11.add(l2);p11.add(l3);
p11.add(l4);p11.add(l5);p11.add(l6);
addWindowListener(this);
p11.setBackground(Color.green);
recdetail=new Label[70];
for(int i=0;i<69;i++)
{
recdetail[i]=new Label(" "); p11.add(recdetail[i]);
}}
public void actionPerformed(ActionEvent ee)

Page No. 28
AIR WAYS

{
int k=0,v=0;
try {
if(ee.getSource()==b1)
{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
c11=DriverManager.getConnection("jdbc:odbc:sum","scott","tiger");
s11=c11.prepareStatement("select * from flight1");
r11=s11.executeQuery();
for(v=0;v<9;v++)
{
r11.next();
recdetail[k].setText(String.valueOf(r11.getInt(1)));
k++;
recdetail[k].setText(String.valueOf(r11.getInt(2)));
k++;
recdetail[k].setText(r11.getString(3)); k++;
recdetail[k].setText(r11.getString(4)); k++;
recdetail[k].setText(String.valueOf(r11.getInt(5)));
k++;
recdetail[k].setText(r11.getString(6));k++;
}}
if(ee.getSource()==b2)
{
setVisible(false);
}
}
catch(Exception nm) { }
}
public void windowClosed(WindowEvent w)
{
setVisible(false);
}
public void windowOpened(WindowEvent w)
{
}
public void windowClosing(WindowEvent w)
{
setVisible(false);
}
public void windowOpening(WindowEvent w)
{
}
public void windowActivated(WindowEvent w)
{}
public void windowDeactivated(WindowEvent w)
{
}
public void windowIconified(WindowEvent w)
{

Page No. 29
AIR WAYS

}
public void windowDeiconified(WindowEvent w)
{}
}
class res extends Frame implements ActionListener,WindowListener
{
Panel p11;
Label l1,l2,l3,l4,l5,l6,l7;
Label recdetail[];
Button b1,b2,b3,b4,b5,b7,b6;
PreparedStatement s11;
Connection c11;
ResultSet r11; GridLayout gg1;
public res()
{
super("Reservation Details"); p11=new Panel();
add(p11);
gg1=new GridLayout(18,7); p11.setLayout(gg1);
b1=new Button("Display"); p11.add(b1);
b1.addActionListener(this);
b2=new Button("Close"); p11.add(b2);
b2.addActionListener(this);
b3=new Button(" "); p11.add(b3);
b4=new Button(" "); p11.add(b4);
b5=new Button(" "); p11.add(b5);
b6=new Button(" "); p11.add(b6);
b7=new Button(" "); p11.add(b7);
l1=new Label("Serial No"); l2=new Label("customername");
l3=new Label("phonenumber"); l4=new Label("source"); l5=new
Label("destination");
l6=new Label("Journydate"); l7=new Label("flightnumber");
p11.add(l1);p11.add(l2);p11.add(l3);p11.add(l4);p11.add(l5);p11.add(l6);p11.add(l7);
addWindowListener(this);
p11.setBackground(Color.green);
recdetail=new Label[100];
for(int i=0;i<99;i++)
{
recdetail[i]=new Label(" "); p11.add(recdetail[i]);
}}
public void actionPerformed(ActionEvent ee)
{
int k=0,v=0;
try { if(ee.getSource()==b1)
{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
c11=DriverManager.getConnection("jdbc:odbc:sum","scott","tiger");
s11=c11.prepareStatement("select
serialnumber,customername,phonenumber,source,destination,journydate,flightnumber from
reservation1");
r11=s11.executeQuery();

Page No. 30
AIR WAYS

for(v=0;v<9;v++)
{
r11.next();
recdetail[k].setText(String.valueOf(r11.getInt(1)));
k++;
recdetail[k].setText(r11.getString(2)); k++;
recdetail[k].setText(String.valueOf(r11.getInt(3)));
k++;
recdetail[k].setText(r11.getString(4)); k++;
recdetail[k].setText(r11.getString(5));k++;
recdetail[k].setText(r11.getString(6));k++;
recdetail[k].setText(String.valueOf(r11.getInt(7)));
k++;
}}
if(ee.getSource()==b2)
{
setVisible(false);
}
}
catch(Exception nm) { }
}
public void windowClosed(WindowEvent w)
{
setVisible(false);
}
public void windowOpened(WindowEvent w)
{
}
public void windowClosing(WindowEvent w)
{
setVisible(false);
}
public void windowOpening(WindowEvent w)
{
}
public void windowActivated(WindowEvent w)
{}
public void windowDeactivated(WindowEvent w)
{
}
public void windowIconified(WindowEvent w)
{
}
public void windowDeiconified(WindowEvent w)
{}
}
class seat extends Frame implements ActionListener,WindowListener
{
Panel p11;
Label l1,l2,l3,l4,l5;

Page No. 31
AIR WAYS

Label recdetail[];
Button b1,b2,b3,b4,b5;
PreparedStatement s11;
Connection c11;
ResultSet r11; GridLayout gg1;
public seat()
{
super("SEAT AVAILABLITY"); p11=new Panel();
add(p11);
gg1=new GridLayout(17,6); p11.setLayout(gg1);
b1=new Button("Display"); p11.add(b1);
b1.addActionListener(this);
b2=new Button("Close"); p11.add(b2);
b2.addActionListener(this);
b3=new Button(" "); p11.add(b3);
b4=new Button(" "); p11.add(b4);
b5=new Button(" "); p11.add(b5);
l1=new Label("Sr No");
l2=new Label("Flight No");
l3=new Label("source");
l4=new Label("destination");
l5=new Label("Available seat");
p11.add(l1);p11.add(l2);p11.add(l3);
p11.add(l4);p11.add(l5);
addWindowListener(this);
p11.setBackground(Color.green);
recdetail=new Label[70];
for(int i=0;i<69;i++)
{
recdetail[i]=new Label(" "); p11.add(recdetail[i]);
}}
public void actionPerformed(ActionEvent ee)
{
int k=0,v=0;
try {
if(ee.getSource()==b1)
{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
c11=DriverManager.getConnection("jdbc:odbc:sum","scott","tiger");
s11=c11.prepareStatement("select serialnumber,flightnumber,source,destination,totalseat from
flight1");
r11=s11.executeQuery();
for(v=0;v<9;v++)
{
r11.next();
recdetail[k].setText(String.valueOf(r11.getInt(1)));
k++;
recdetail[k].setText(String.valueOf(r11.getInt(2)));
k++;
recdetail[k].setText(r11.getString(3)); k++;

Page No. 32
AIR WAYS

recdetail[k].setText(r11.getString(4)); k++;
recdetail[k].setText(String.valueOf(r11.getInt(5)));
k++;
}}
if(ee.getSource()==b2)
{
setVisible(false);
}
}
catch(Exception nm) { }
}
public void windowClosed(WindowEvent w)
{
setVisible(false);
}
public void windowOpened(WindowEvent w)
{
}
public void windowClosing(WindowEvent w)
{
setVisible(false);
}
public void windowOpening(WindowEvent w)
{
}
public void windowActivated(WindowEvent w)
{}
public void windowDeactivated(WindowEvent w)
{
}
public void windowIconified(WindowEvent w)
{
}
public void windowDeiconified(WindowEvent w)
{}
}
class addfare extends Frame implements ActionListener,WindowListener
{
Panel p1;
Label l1,l2,l3,l4,l5,l6;
TextField t1,t2,t3,t4,t5,t6;
Button b1,b2;
PreparedStatement s1;
Connection c1;
public addfare()
{
super("ADD-FARE");
p1=new Panel();
add(p1);
GridLayout gg = new GridLayout (9,2);

Page No. 33
AIR WAYS

p1.setLayout(gg);
l1=new Label("Enter the Routecode");
p1.add(l1);
t1=new TextField(6);
p1.add(t1);
l2=new Label("Enter the Source");
p1.add(l2);
t2=new TextField(6);
p1.add(t2);

l3=new Label("Enter the Destination");


p1.add(l3);
t3=new TextField(6);
p1.add(t3);
l4=new Label("Enter the First Class Fare");
p1.add(l4);
t4=new TextField(6);
p1.add(t4);
l5=new Label("Enter the Bussiness Class Fare");
p1.add(l5);
t5=new TextField(6);
p1.add(t5);
l6=new Label("Enter the Economic Class Fare");
p1.add(l6);
t6=new TextField(6);
p1.add(t6);
b1=new Button("OK");
p1.add(b1);
b1.addActionListener(this);
b2=new Button("Close");
p1.add(b2);
b2.addActionListener(this);
addWindowListener(this);
p1.setBackground(Color.red);
}
public void actionPerformed(ActionEvent e)
{
try
{
if(e.getSource()==b1)
{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
c1=DriverManager.getConnection("jdbc:odbc:sum","scott","tiger");
s1=c1.prepareStatement("insert into fare values(?,?,?,?,?,?)");
s1.setInt(1,Integer.parseInt(t1.getText()));
s1.setString(2,String.valueOf(t2.getText()));
s1.setString(3,String.valueOf(t3.getText()));
s1.setInt(4,Integer.parseInt(t4.getText()));
s1.setInt(5,Integer.parseInt(t5.getText()));
s1.setInt(6,Integer.parseInt(t6.getText()));

Page No. 34
AIR WAYS

s1.executeUpdate();
dlg d0=new dlg(new Frame(),"Message","Your Record is Inserted");
d0.setSize(150,200);
d0.setVisible(true);

}
if(e.getSource()==b2)
{
setVisible(false);
}
}
catch(Exception k)
{
dlg vi1= new dlg(new Frame(),"Error","your record is not inserted");
vi1.setSize(150,150); vi1.setVisible(true);
}}
public void windowClosed(WindowEvent w)
{
setVisible(false);
}
public void windowOpened(WindowEvent w)
{
}
public void windowClosing(WindowEvent w)
{
setVisible(false);
}
public void windowOpening(WindowEvent w)
{
}
public void windowActivated(WindowEvent w)
{}
public void windowDeactivated(WindowEvent w)
{}
public void windowIconified(WindowEvent w)
{}
public void windowDeiconified(WindowEvent w)
{}
}
class showfare extends Frame implements ActionListener,WindowListener
{
Panel p11;
Label l1,l2,l3,l4,l5,l6;
Label recdetail[];
Button b1,b2,b3,b4,b5,b6;
PreparedStatement s11;
Connection c11;
ResultSet r11; GridLayout gg1;
public showfare()
{super("SHOW-FARE"); p11=new Panel();

Page No. 35
AIR WAYS

add(p11);
gg1=new GridLayout(20,7); p11.setLayout(gg1);
b1=new Button("Display"); p11.add(b1);
b1.addActionListener(this);
b2=new Button("Close"); p11.add(b2);
b2.addActionListener(this);
b3=new Button(" "); p11.add(b3);
b4=new Button(" "); p11.add(b4);
b5=new Button(" "); p11.add(b5);
b6=new Button(" "); p11.add(b6);
l1=new Label("Routecode"); l2=new Label("Source");
l3=new Label("Destination"); l4=new Label("FirstclassFare"); l5=new
Label("BussinessclassFare");
l6=new Label("EconomicclassFare");
p11.add(l1);p11.add(l2);p11.add(l3);p11.add(l4);p11.add(l5);p11.add(l6);
addWindowListener(this);
p11.setBackground(Color.green);
recdetail=new Label[100];
for(int i=0;i<99;i++)
{
recdetail[i]=new Label(" "); p11.add(recdetail[i]);
}}
public void actionPerformed(ActionEvent ee)
{
int k=0,v=0;
try { if(ee.getSource()==b1)
{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
c11=DriverManager.getConnection("jdbc:odbc:sum","scott","tiger");
s11=c11.prepareStatement("select * from fare");
r11=s11.executeQuery();
for(v=0;v<9;v++)
{
r11.next();
recdetail[k].setText(String.valueOf(r11.getInt(1)));
k++;
recdetail[k].setText(r11.getString(2)); k++;
recdetail[k].setText(r11.getString(3)); k++;
recdetail[k].setText(String.valueOf(r11.getInt(4)));
k++;
recdetail[k].setText(String.valueOf(r11.getInt(5)));
k++;
recdetail[k].setText(String.valueOf(r11.getInt(6)));
k++;
}}
if(ee.getSource()==b2)
{
setVisible(false);
}}

Page No. 36
AIR WAYS

catch(Exception nm) { }
}
public void windowClosed(WindowEvent w)
{
setVisible(false);
}
public void windowOpened(WindowEvent w)
{
}
public void windowClosing(WindowEvent w)
{
setVisible(false);
}
public void windowOpening(WindowEvent w)
{
}
public void windowActivated(WindowEvent w)
{}
public void windowDeactivated(WindowEvent w)
{
}
public void windowIconified(WindowEvent w)
{
}
public void windowDeiconified(WindowEvent w)
{}
}
class dlg extends Dialog implements ActionListener
{
public dlg(Frame f1,String s,String m){
super(f1,s);
Panel p1= new Panel();
add(p1);
GridLayout gg= new GridLayout(3,2);
p1.setLayout(gg);
Label l1= new Label(m);
p1.add(l1);
Button b1= new Button("ok");
p1.add(b1);
b1.addActionListener(this);
}
public void actionPerformed(ActionEvent e)
{
dispose();
}}s

Page No. 37
AIR WAYS

INPUT/OUTPUT SCREENS

AIR WAY FORM

Page No. 38
AIR WAYS

FLIGHT FORM

Page No. 39
AIR WAYS

RESERVATION FORM

Page No. 40
AIR WAYS

CANCELLATION FORM

Page No. 41
AIR WAYS

FLIGHT DETAIL FORM

Page No. 42
AIR WAYS

SEAT AVAILABILITY FORM

Page No. 43
AIR WAYS

ADD FARE

Page No. 44
AIR WAYS

SHOW FARE

Page No. 45
AIR WAYS

FUTURE SCOPE OF THE


PROJECT

Scope of the Proposed System 


The proposed system can be –

 Developed further to get many AIRWAY Details reports.

 Integrated with other systems, viz. Production, Planning and


Control systems and invoicing system.

 Backup & Recovery Feature.


 Easier & Improved Transaction Entry.

Page No. 46
AIR WAYS

REFERENCES

1. The Complete Reference to Java 5.0 by Herbert Schdilt.

2. SUN’S JAVA CERTIFICATION (SCJP 1.4) by KHALID A.

MUGAL.

3. Gateway to J2SE by Keyur Shah.

4. Programmers guide to Java2.0 by Ivor Harton.

5. Programming with Java by E. Balagurusamy.

Page No. 47

Vous aimerez peut-être aussi