Académique Documents
Professionnel Documents
Culture Documents
Page No. 1
AIR WAYS
Contents
Page No. 2
AIR WAYS
CONTENTS
Project Title
Acknowledgement
Introduction
System Analysis
System Design
System Implementation
Feasibility Study
Coding
Input/Output Forms
References
ACKNOWLEDGEMENT
Page No. 3
AIR WAYS
ASHA CHAUHAN
B.Tech Vth Sem.
(Computer Science)
Page No. 4
AIR WAYS
INTRODUCTION
Page No. 5
AIR WAYS
SYSTEM ANALYSIS
Page No. 6
AIR WAYS
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
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
PLATFORM
Windows 95
Windows 98
Windows NT
Windows 2000 Server
Windows XP
UNIX,LINUX
Page No. 8
AIR WAYS
Page No. 9
AIR WAYS
SYSTEM DESIGN
Page No. 10
AIR WAYS
SYSTEM IMPLEMETATION
After the testing process, the sytem has been tested in real
Environment for any possible bugs.
Page No. 11
AIR WAYS
Feasibility Study
and the cost of each system, and final selection of the best system.
Page No. 12
AIR WAYS
them.
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)
{}
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);
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
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);
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
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);
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
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
Page No. 42
AIR WAYS
Page No. 43
AIR WAYS
ADD FARE
Page No. 44
AIR WAYS
SHOW FARE
Page No. 45
AIR WAYS
Page No. 46
AIR WAYS
REFERENCES
MUGAL.
Page No. 47