100% found this document useful (1 vote)
209 views80 pages

HA501 Flight Reservation System Overview

This document summarizes an airline reservation system project submitted by Manish Kumar. It includes an abstract, system analysis, data flow diagram, entity relationship diagram, and overview of the project requirements, design description, database design, and testing example. The project aims to develop a web-based airline reservation system that allows customers to search, book, and cancel flights between cities on specific dates.

Uploaded by

babloo08
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
209 views80 pages

HA501 Flight Reservation System Overview

This document summarizes an airline reservation system project submitted by Manish Kumar. It includes an abstract, system analysis, data flow diagram, entity relationship diagram, and overview of the project requirements, design description, database design, and testing example. The project aims to develop a web-based airline reservation system that allows customers to search, book, and cancel flights between cities on specific dates.

Uploaded by

babloo08
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd

AIRLINE RESERVATION SYSTEM

Computer Application
NAME:- Manish kumar SUBMITTED TO: SEC.:- RD1R04A10 ROLL NO.:-A-10 [Link].:-11105436

[Link] GUPTA

TABLE OF CONTENTS:
1. Absstrect 2. System analysis 3. Data flow diagram 4. E-diagrame of alr 5. Airline Reservation System I. II. III. IV. V. VI. Overview Project Requirements Design Description Scheme of the System Data base. Testing Example

6. Overview 7. Project requirment 8. Design description 9. Data base design 10. 11. 12. 13. 14. 15. 16. 17. TABLE FLIGHT THIRD NORMAL FORM (3NF) FLIGHT DETAILS: RELIABLE SECURE OTHER REASONS Software Technologies Java Server Pages (JSP)

18. 19. 20. 21. 22. 23. 24. 25. 26. 27. 28. 29.

Java Servlets Java mail XML JAVA SCRIPT CONTROL FLOW IN A TYPICAL USER SESSION: SECURITY Password Encryption Encryption of Credit Card Details Httpsessions DISTRIBUTION OF COMPUTATION Source code Design

30. BOBLOGRAPHY

CERTIFICATE This is to certify that airlines reservation system in India embodies the original Work done by Manish kumar during this project submission as a partial fulfilment of the requirement for the System Design Project of Masters of

Computer Application 3rd Semester, of Lovely professional university Senior Lect MR. SUMIT GUPTA

PROBLEM STATEMENT
The web based airline reservation system project is an attempt to stimulate the basic concepts of airline reservation system. The system enables the customer to do the things such as search for airline flights for two

travel cities on a specified date, choose a flight based on the details, reservation of flight and cancellation of reservation. The system allows the airline passenger to search for flights that are available between the two travel cities, namely the Departure city and Arrival city for a particular departure and arrival dates. The system displays all the flights details such as flight no, name, price and duration of journey etc. After search the system display list of available flights and allows customer to choose a particular flight. Then the system checks for the availability of seats on the flight. If the seats are available then the system allows the passenger to book a seat. Otherwise it asks the user to choose another flight. To book a flight the system asks the customer to enter his details such as name, address, city, state, credit card number and contact number. Then it checks the validity of card and book the flight and update the airline database and user database. The system also allows the customer to cancel his/her reservation, if any problem occurs.

Abstract

This paper presents a research project which is directed to awareness about database management of airline reservation system in India. We concentrate on airline management applications and information systems such as reservation of ticket and ward management, customer resources. This means that although the models extracted highly differ between airline reservation, data mining processes are highly similar across different airline reservation. We argue how a tool can be constructed in such a way that it automates

many DM processes and that can be ported to other airline which could benefit more quickly of a first DM experience. Our work plan covers all the stages in the process of Knowledge Discovery from Databases data leansing, extraction and integration from the AIS and external data, construction of tasks and minable views, model generation, and finally a module to carry out and interpret their predictions. We also consider a module to perform simulations and to integrate the models extracted by the previous modules with other decision support systems as well as model monitoring.

SYSTEM ANALYSIS
a. Hardware Requirement b. Software Requirement

HARDWARE REQUIREMENT PROCESSOR RAM DISK SPACE Pentium II, 64 Mb or Higher 130 MB
Pentium III, Pentium IV any other

SOFTWARE REQUIREMENT OPERATING SYSTEM DATA BASE WINDOW XP,WINDOW SQL/ORACLE 98,WINDOW VISTA

Data Flow Diagrams


A data flow diagram (DFD) is a graphical representation of the "flow" of data through an information system. A data flow diagram can also be used for the visualization of data processing (structured design). It is common practice for a designer to draw a context-level DFD first which shows the interaction between the system and outside entities. This context-level DFD is then

"exploded" to show more detail of the system being modeled. DFD of Airlines reservation in India Data flow diagrams were invented by Larry Constantine, the original developer of structured design, based on Martin and Strings "data flow graph" model of computation. Data flow diagrams are one of the three essential perspectives of Structured Systems Analysis and Design Method SSADM. The sponsor of a project and the end users will need to be briefed and consulted throughout all stages of a system's evolution. With a dataflow diagram, users are able to visualize how the system will operate, what the system will accomplish, and how the system will be implemented. The old system's dataflow diagrams can be drawn up and compared with the new system's dataflow diagrams to draw comparisons to implement a more efficient system. Dataflow diagrams can be used to provide the end user with a physical idea of where the data they input ultimately has an effect upon the structure of the whole system from order to dispatch to restock how any system is developed can be determined through a dataflow diagram.

Update history servlet Insert row in flight history table for each flight with user name

Success inserting into flight history table

Problem inserting into flight history table

Display all flights booked by user name

Error in flight

No more flight selection? Logout

Book another flight return to welcome

Remove username from session

E-R DIAGRAME OF AIRLINE RESERNATION

BACKEND

Airline Reservation System


1. Overview................................................. ............................. 2. ProjecRequirements................................ ............................ 3. DesignDescription................................... ........................... 3.1SchemeoftheSystem........................... ............................ 3.2Database............................................ ............................. 3.3 TestingExample........................................
..........................................

Overview
The Airline reservation system is a Web-based on-line reservation system that Is intended to provide information needed to reserve seat(s) on certain flights.

This project is based on the 3-tier architecture. It is a pure JAVA/HTML/JSP/Servlet solution.

Project requirements
Each flight has a limited number of available seats. There are number Of flights that go from/to different cities at different dates and time. The server shall maintain a table for the list of available flights where each row within the table has the following fields: Flight number, Departure city, Destination City, Departure date, Departure time, Arrival date, and Arrival Time, Capacity, and Available seats. The values within this table will be hard coded. The Server shall maintain a table for the customers where each row Within the table have the following fields: Confirmation number, Customer Name, Customer Address, and Departure Flight Number. The values within this table will be created when the user makes a Reservation. The confirmation number is a string that is composed of the date

(mmddyy), time, flight number, and a random number in the range [15000].Assume the customers are interest always in one-way trip Have at least 50 flights in your database. For the user interface, You have to give an option for departure city For the user interface, You have to give an option for arrival city For the user interface, You have to give an option for departure date For the user interface, You have to give an option for departure time Once the user makes the selection for departure/arrival city and clicks The OK button you will contact the server in order to see if there are Such flights available in the database, and if there are, then the server Illinois Institute of Technology CS441 Project Zornitza Panayotova 4 12/05/02 will calculate the fare and send them to the client that will display them for the user along with departure/arrival time from Departure/destination cities. Within this page, you will have 2 buttons: Reserve or Cancel. If the user selects the reserve button of the previous requirement, then new page will

be displayed that will prompt the user to enter the following: Customer Name, Customer Address, Customer Credit Card Number, and a Submit Button. Once the user selects the Submit button of the previous requirement, Then the client will send the information to the server and in return Gets back a confirmation number that it will display for the customer And provide an OK button in order to return to the home page. The user should be provided with a panel that will allow the user to Cancel certain reservation. Once the user enters a confirmation number to cancel the client will send this confirmation number and the server will delete this Reservation from its customer table. The user shall provide a valid confirmation number in order to cancel Certain reservation and if the user enters an invalid confirmation Number and error message shall be displayed for the user

Design description

DATABASE OF AIRLINE RESERVAT ION

DATABASE DESIGN
We use Oracle as the backend and use JDBC connectivity to access the database. The servlets access the database using JDBC and output the results according to the query, which again takes into account the options, selected by the user. The following gives the various tables and their fields used in our database, which was a major design decision of our project.

TABLE FLIGHT Flight no. 1 2 3 4 Departure city BOMBAY AMIRTSAR DELHI BANGLOR Designatio price n city LONDON 647444 AUS 34544 FRANCE JAPAN 55466 566656 compactly 5456 5454 6465 5345

TABLE CUSTMER CUSTMER ID 001 002 003 CUTMER FIRST NAME AMAN DEEP SINGH CUSTMER LAST NAME AA BB CC ADDRESS MUKTSAR BOMBY SAMME CITY MUKTSAR JULANDHAR PHAGWARA

SCEDULE 12TH 22TH 3RD

FLIGHT NO 1 2 3

ARIVAL DATE 12-12-2008 11-12-2008 13-12-2008

AVALABLE SEATS 222 444 555

TABLE RESERVATION

TABLE OF SEATS

FLIGHT DETAILS: AR_FLIGHT_MST


FL_NO FL_NAME ORG_CD DES_CD CAPACITY VARCHAR2(7) VARCHAR2(25) NUMBER(3) NUMBER(3) NUMBER(3) PRIMARY KEY NOT NULL NOT NULL NOT NULL NOT NULL

AR_FLIGHT_DET

FL_NO HALT_CD DIST_FRM_ORG NO_QUOTA NO_BOOKED JOUR_DATE

VARCHAR2(7) NUMBER(3) NUMBER(3) NUMBER(3) NUMBER(3) -

PRIMARY KEY (REFERENCE AR_FLIGHT_MST.FL_NO) PRIMARY KEY NOT NULL

THIRD NORMAL FORM (3NF) : Third Normal Form normalization will be needed where all attributes in a relation tuple are not functionally dependent only on the key attribute. A transitive dependency is one in which one in which one attribute depends on second which is turned depends on a third and so on.

FLIGHT DETAILS: AR_FLIGHT_MST

FL_NO FL_NAME ORG_CD DES_CD CAPACITY

VARCHAR2(7) VARCHAR2(25) NUMBER(3) NUMBER(3) NUMBER(3)

PRIMARY KEY NOT NULL NOT NULL NOT NULL NOT NULL

AR_FLIGHT_DET

FL_NO HALT_CD DIST_FRM_ORG NO_QUOTA NO_BOOKED JOUR_DATE

VARCHAR2(7) NUMBER(3) NUMBER(3) NUMBER(3) NUMBER(3) -

PRIMARY KEY (REFERENCE AR_FLIGHT_MST.FL_NO) PRIMARY KEY NOT NULL

AR_HALT_MST

HALT_CD DESCRIPTION

NUMBER(3) VARCHAR2(30)

PRIMARY KEY NOT NULL

DATABASE SERVER
Oracle instead of any other prevailing database servers SCALABLE Oracle supports the largest databases, which can contain terabytes of data. To make efficient use of expensive hardware devices, Oracle Enables full control of space usage. Even though we want to extend our Site to incorporate upcoming various Airlines database we would be RELIABLE For now, since our website is not a full-fledged corporate website we are estimating that there would be a maximum of 150-200 hits per day including from all the above mentioned categories of audience who come to our site either to make an online reservation or to compare the prices of various airlines.

Oracle supports large numbers of concurrent users executing a variety Of database applications operating on the same data. It minimizes data Contention and guarantees data concurrency. This definitely helps We make our website robust and accessible to much number of users Simultaneously. In future even though users increase there would be no Problem on overall. SECURE One of the major concerns about our database were the security issues as we would be maintaining tables to store user information like his user-name, password and personal information like credit card details. We had this extra overhead of maintaining all this information securely and at the same time transparent to the user. We have no regrets now for choosing Oracle as our database server. To protect against unauthorized database access and use, Oracle provides security features to limit and monitor data access. These features make it easy to manage even the most complex design for data access.

OTHER REASONS Based upon the functionality of our website, it obvious that we have to be in a position to handle requests from users accessing our website from various different types of computers and operating systems. Oracle software enables different types of computers and operating systems to share information across networks. Even in future if we want to jump into distributed environment/network we can do so. For networked, distributed environments, Oracle combines the data physically located on different computers into one logical database that can be accessed by all network users. Apart from these reasons, Oracle software lets you replicate groups of tables and their supporting objects to multiple sites. Oracle supports replication of both data- and schema-level changes to these sites.

Software Technologies: 1. Java Server Pages (JSP) 2. Java Servlets

3. Java Beans 4. JavaMail 5. XML & XSL 6. HTML 7. WML 8. JavaScript 9. HTTP Sessions 10. Java Bean Java Server Pages (JSP) Regular HTML, of course, cannot contain dynamic information. JSP is so easy and convenient that it is quite feasible to augment HTML pages that only benefit marginally by the insertion of small amounts of dynamic data. JSP was designed to work with Java Servlets and JavaBeans in a seamless fashion; it provides applications developers with the capability to cleanly separate content generation from content presentation. This means that Web page designers can work independently from business logic developers, and the end result will work in a distributed, heterogeneous computing environment.

Java Servlets Java Servlets are server-side technologies that provide a component-based, platform-

independent method for building web-based applications. They provide web developers with a simple, consistent mechanism for extending the functionality of a web server and for accessing existing databases. Since our website was more database-centric we found servlets as more appropriate choice. Servlets have access to the entire family of Java APIs, including the JDBC API to access databases. Servlets can also access a library of HTTP-specific calls and receive all the benefits of the mature Java language, including portability, performance, reusability, and crash protection. Our other alternative for Java servlets was CGI. But we continued with Java servlets mainly because of the following reasons I) Efficient: With traditional CGI, a new process is started for each HTTP request. With servlets, the Java Virtual Machine stays up, and each request is handled by a lightweight Java thread, not a heavyweight operating system process. ii) Convenient: Each one of us was more comfortable with Java Besides the convenience of being able to use a familiar language, servlets they have this added

advantage of automatically parsing and decoding HTML form data, tracking sessions, and many other such tasks. As these operations were very much needed for our website we found our decision to be right. iii) Powerful: Java servlets let us do several things easily, which are either difficult or impossible by traditional CGI. One thing is servlets can talk directly to the Web server (regular CGI programs can't). This simplified operations that needed us to look up data stored in standard places. We found them very useful in maintaining information from request to request, simplifying things like session tracking and caching of previous computations. Java mail Hosting an Online Air tickets Website we had this requirement of sending out an email to our customer once he purchased ticket through our site as a confirmation with his flight details and schedule. As we were using Java as our programming language we had this added advantage of using JavaMail API to suffice our need.

We implemented this feature of sending out emails using JavaMail successfully. For this we had to download Java mail API and JavaBeans activation Framework apart from setting their paths in our webservers class path. JavaMail API allowed us to instantly add the ability to send-out e-mail with our Java applications with negligible programming effort. XML XML was mainly used because of its extensibility feature. It had this added advantage of presenting the same content in different formats to different clients. Our site is completely driven by XML data. We have implemented all our servlets in such a way that they throw XML DOM tree for each and every page. So once we had this XML DOM tree in hand we implemented XSLs to throw out either a HTML data or WML data to the client depending on either the request coming from http browser or WAP browser. In this way our site is more extensible, suppose that in future we had to extend our site to clients with a new markup language what all we need to do is write out a separate

XSL to display the data in the form specific to that client. Another major advantage of sending XML data to the client instead of html data is, we can offload some computation to the client from the server. i.e. we werent forced to bother about the presentation data on the server's side, instead we concentrated on sending the data and using style sheets to display it in according to the clients needs.

Our site is PDA enabled. We used WML to make our site accessible through handheld devices. WML is the basic mark-up language for the alternate web-access devices. JAVA SCRIPT JavaScript was basically used for client-side validation. JavaScript is compatible with all versions of Microsoft Internet Explorer and Netscape Navigator

In the Design of our website we made an assumption that we are accessing the database of different airline to get the flight information. Any last minute changes to the flight schedule are taken care by the respective airlines. Presently we are accessing database of three airlines. In our website we will be maintaining the table to hold user information, his transaction details only. The figure shows how our website is organized. The Servlet accesses the Database, which use the bean. The Servlet , which contains the required information. This XML it transformed in to a code containing HTML, JAVASCRIPT code. Which is displayed to the user in a web browser? In case of a PDA device WML code is generated by the XSL. We are using an Applet to encrypt to user credit card and password information. CONTROL FLOW IN A TYPICAL USER SESSION: 1. User will type the URL of our site: [Link] in the browser. 2. User will be shown our homepage containing various page links and search option. 3. User will click on the Login button to log on into our system. 4. The user-id and password are validated and the user is allowed to login.

5.

The user is directed to the home page where he can start his search for his travel options. 6. The user can select the Departure and arrival cities and click on the Search button. 7. The user will be shown a page with various list boxes he has to choose for his tickets. 8. The user will select the departure airport, arrival airport, departure date, arrival date, and number of tickets and will click on the Search button again. 9. For his search criteria. The user can select one of the options and click on the Buy button. 10. The user will be shown the details of the option and the discount offered to him on his selection for his confirmation. 11. The user can click on the Confirm button or can cancel even at this point. 12. If he chooses to buy this ticket he will be sent E-mail with all details of the tickets and is shown a page with a link to the flight seating arrangement details page. 13. User can click on that link and go to the Flight seating arrangement details page. 14. He can click on the link corresponding to his flight number to see the seating arrangement of his flight. 15. User can either continue shopping or close his session by logging out of the system.

SECURITY We have been very much successful in implementing the security features to our site as stated in our project specifications. We are enclosing the brief description of how we have carried out this feature. Password Encryption We have used Java Applets for the encryption of the password typed by the user. We implemented the UNIX Crypt command for the password encryption. The encrypted password is sent to the servlet. The encrypted password itself is stored in the database table. This will avoid unauthorized users/malicious technical staff from accessing our database. Whenever user tries to login into our system, the password typed by the user is again encrypted and is compared with the encrypted password stored in the database. Encryption of Credit Card Details: We have used RSA algorithm for the encryption of the credit card number. When the user gives credit card number in the Registration form, the credit card number is encrypted using a Java Applet

implementing the RSA algorithm and is sent to the servlet. The encrypted credit card number is decrypted using the same algorithm and is stored in the database. For all other purposes the server will use the format XXXX-XXXX-XXXX-1234 and send only the last four digits of the credit card. So the sensitive card information is well secured in our system. Httpsessions We have implemented session tracking using HTTP sessions API provided by the servlets. New session is created each time a user logs in and all the information required is stored in the session object. The HTTP session keeps track of the user status and whenever he logs out of the system, the entire data in the session object is destroyed so that other users cant access his information. More over we are not storing the entire credit card number in the session, only the last four digits are stored. So, even if the user doesnt close the browser, others cant access his personal details.

HANDICAPPED ACCESS: Text-Only Version: We have provided text-only version of our entire website which makes it more accessible to

both the handicapped users computational powered devices.

and

low

ALT Tags: We have provided ALT tags to all the images and other multimedia content on our website. This will enable the handicapped users to use their screen readers to know about the images on our site. Sitemap: We provided a map of our entire website. A hyperlink is given on Home page so that users can click on that link to have the entire sitemap. In this way the users can have a quick glance of our entire site. This will also enable the handicapped users who are unable to find particular page access that page directly from our sitemap. No Frames: We have completely avoided using frames on our web pages as these frames avoid screen readers providing information to the handicapped users. Minimal User Input: We have taken major steps to minimize the user input. We used Pull Down menus to avoid the user providing

the information. User can browse the entire site with very less amount of input. This will attract not only the handicapped users but also the normal users.

DISTRIBUTION OF COMPUTATION A. Client-side Computation: Password encryption and Credit Card encryption are done at the client-side using the java applets. This will reduce the server side computation a bit. Validation of the data entered by the user is done at the client-side using JavaScript. This will avoid the users entering invalid data. All the fields either in Registration form or in Login form are checked before sending to the servlet. As we have designed our Servlets in such a way that they throw out the XML DOM tree, in a way we are able to offload the computation to the client side thereby reducing the overhead on the server side.

Server-side Computation: The server side computations include Servlet accessing the database Building the XML DOM tree

XSL transforming the XML data into HTML/WML We are assuming that at most 500 simultaneous users will access our site at any instance, so this requires high computational powered server. We assumed dual processor web server with each 1.0 GHz power. This will be sufficient for the requirements. MULTIMEDIA: Inner view of the Flights: We created various flash videos giving the details Statistical details Seating arrangement Details Rough Pictorial View of the Flights.

FLEXIBILITY: Content generation and Content Presentation are separated in our system. We used XML and XSL for achieving this feature. This will enable us to extend our site to new era of alternate web access devices. We implemented our system accessing an airline database at the backend. We can extend this to

access any number of airline databases as backend information providers.

PERFORMANCE RESULTS: Since our website doesnt involve bandwidth occupying images or bitmaps which could unnecessarily take lot of time to load, our loading times for each of the JSP pages are quite decent and fast. Moreover we are calculating the clients bandwidth dynamically and directing the client to the text version if it has low bandwidth. The pages that invoke the servlets (which in turn access the database) to generate dynamic content may take some few seconds to load as the servlet has to establish a connection and then has to query the database. This cannot be avoided in our case and it doesnt occupy much of a time really. The performance result actually depends on the number of users accessing the database. Our optimal case, average case and the worst case all depend upon the number of users trying to connect to the database. The worst case will be when several hundreds of users are accessing the pages, which might cause the database server to crash. Since we create new connection every time a servlet is invoked it could be

a case that the connections are used rapidly and it will come to a point where the database server could crash.

Implementation
We had problems in implementing Dynamic Bandwidth Calculation in our site. We used an Applet to load a fixed-size image from the server to the client in the background. Based on the time taken by the file transmission we tried to direct the user to either Graphical version or the Text version of our site. We initially thought of providing the user an option of sorting the results based on his own priority. We started implementing this using java script but we were unable to implement it both in Internet explorer and Netscape navigator. We thought this wouldnt affect our sites experience much. We initially planned to show the user an animated inner view of the flights but we were unable to create the animated pictures and hence

we used flash to show various static images of the flights. Initially we installed Tomcat Version 3.4.1 but it was unable to recognize the class path. So we had to move to Version 3.2.4. We had many problems with the WAP simulators in passing the parameters dynamically to the servlets. We tried on many available WAP simulators but we were unable to find one for our purpose.

Create:
import [Link].*; import [Link].*; import [Link].*; public class Create extends Frame implements ActionListener { TextField t1,t2,t3,t4,t5,t6,t7,t8,t9,t10; Label l1,l2,l3,l4,l5,l6,l7,l8,l9,l10,l11,l12,l13,l14,l15,l16,l17; Choice c; Button b1,b2,b3; GridBagLayout gbl; GridBagConstraints gbc; Connection con; PreparedStatement ps; Statement stmt; ResultSet rs;

int count; Font f; Create() { setBackground([Link]); f = new Font("TimesRoman",[Link],20); gbl=new GridBagLayout(); gbc=new GridBagConstraints(); setLayout(gbl); l15 = new Label("Flight No"); [Link](f); l1 = new Label("Travel Date"); [Link](f); l2 = new Label("FName"); [Link](f); l3 = new Label("LName"); [Link](f); l4 = new Label("Age"); [Link](f); l5 = new Label("Gender"); [Link](f); l6 = new Label("Address"); [Link](f); l7 = new Label("Phone"); [Link](f); l8= new Label("Class"); [Link](f); l9= new Label("Status"); [Link](f);

t10 = new TextField(20); t1 = new TextField(20); t2 = new TextField(20); t3 = new TextField(20); t4 = new TextField(20); t5 = new TextField(20); t6 = new TextField(20); t7 = new TextField(20); t8 = new TextField(20); t9 = new TextField(20); c = new Choice(); b1 = new Button("Submit"); b2 = new Button("Reset"); b3 = new Button("Generate Ticket"); l10 = new Label(""); l11 = new Label(""); l12 = new Label(""); l13 = new Label(""); l14 = new Label(""); [Link]=0; [Link]=0; [Link](l10,gbc); add(l10); [Link]("DL - BGR : HA101"); [Link]("BGR - DL : HA102");

[Link]("DL - BY : HA201"); [Link]("BY - DL : HA202"); [Link]("DL - KLA : HA301"); [Link]("KLA - DL : HA302"); [Link]("DL - CHN : HA401"); [Link]("CHN - DL : HA402"); [Link]("DL - HYD : HA501"); [Link]("HYD - DL : HA502"); [Link]("DL - PUN : HA601"); [Link]("PUN - DL : HA602"); [Link]=2; [Link]=0; [Link](c,gbc); add(c); [Link]=0; [Link]=2; [Link](l13,gbc); add(l13); [Link]=2; [Link]=2; [Link](l14,gbc); add(l14); [Link]=0; [Link]=4; [Link](l15,gbc); add(l15);

[Link]=2; [Link]=4; [Link](t10,gbc); add(t10); [Link]=0; [Link]=6; [Link](l1,gbc); add(l1); [Link]=2; [Link]=6; [Link](t1,gbc); add(t1); [Link]=0; [Link]=8; [Link](l2,gbc); add(l2); [Link]=2; [Link]=8; [Link](t2,gbc); add(t2); [Link]=0; [Link]=10; [Link](l3,gbc); add(l3);

[Link]=2; [Link]=10; [Link](t3,gbc); add(t3); [Link]=0; [Link]=12; [Link](l4,gbc); add(l4); [Link]=2; [Link]=12; [Link](t4,gbc); add(t4); [Link]=0; [Link]=14; [Link](l5,gbc); add(l5); [Link]=2; [Link]=14; [Link](t5,gbc); add(t5); [Link]=0; [Link]=16; [Link](l6,gbc); add(l6); [Link]=2;

[Link]=16; [Link](t6,gbc); add(t6); [Link]=0; [Link]=18; [Link](l7,gbc); add(l7); [Link]=2; [Link]=18; [Link](t7,gbc); add(t7); [Link]=0; [Link]=20; [Link](l8,gbc); add(l8); [Link]=2; [Link]=20; [Link](t8,gbc); add(t8); [Link]=0; [Link]=22; [Link](l9,gbc); add(l9); [Link]=2; [Link]=22;

[Link](t9,gbc); add(t9); [Link]=0; [Link]=24; [Link](l11,gbc); add(l11); [Link]=2; [Link]=24; [Link](l12,gbc); add(l12); [Link]=0; [Link]=26; [Link](b1,gbc); add(b1); [Link]=2; [Link]=26; [Link](b2,gbc); add(b2);

/*

[Link]=0; [Link]=28; [Link](l16,gbc); add(l16);

[Link]=2; [Link]=28; [Link](l17,gbc); add(l17); [Link]=0; [Link]=30; [Link](b3,gbc); add(b3); */ [Link](this); [Link](this); [Link](this); addWindowListener(new W());

// }

public void actionPerformed(ActionEvent ae) { if([Link]()==b1) { try { [Link]("[Link]");

con=[Link]("jdbc:odbc:MyDataSo urce1"); ps=[Link]("insert into Passengers(FlightNo,TravelDate,FName,LName,Age,Gend er,Address,Phone,Class,Status)values(?,?,?,?,?,?,?,?,?,?)"); String age = [Link](); [Link](1,[Link]()); [Link](2,[Link]()); [Link](3,[Link]()); [Link](4,[Link]()); [Link](5,[Link](age)); [Link](6,[Link]()); [Link](7,[Link]()); [Link](8,[Link]()); [Link](9,[Link]()); [Link](10,[Link]()); [Link]();

if([Link]().equals([Link]('F'))) { String str = "update Reservation set FSeats=FSeats-1 where FlightNo=? and TravelDate = ?"; ps = [Link](str); [Link](1,[Link]()); [Link](2,[Link]()); count = [Link]();

} if([Link]().equals([Link]('B'))) { String str = "update Reservation set BSeats=BSeats-1 where FlightNo=? and TravelDate = ?"; ps = [Link](str); [Link](1,[Link]()); [Link](2,[Link]()); count = [Link](); } if([Link]().equals([Link]('E'))) { String str = "update Reservation set ESeats=ESeats-1 where FlightNo=? and TravelDate = ?"; ps = [Link](str); [Link](1,[Link]()); [Link](2,[Link]()); count = [Link](); }

[Link](); [Link](""); [Link](""); [Link]("");

[Link](""); [Link](""); [Link](""); [Link](""); [Link](""); [Link](""); [Link](""); Ticket t = new Ticket(); //setVisible(false); [Link](400,500); [Link](true); [Link]("Ticket Screen");

} catch(SQLException e) { [Link]("2 Error : "+e); } catch(Exception ex) { [Link]("Error 1:"+ex); } } if([Link]()==b2)

{ [Link](""); [Link](""); [Link](""); [Link](""); [Link](""); [Link](""); [Link](""); [Link](""); [Link](""); [Link]("");

} }

class W extends WindowAdapter { public void windowClosing(WindowEvent e) { setVisible(false); dispose();

} } public static void main(String args[]) { Create v = new Create(); [Link](400,500); [Link](true); [Link]("Create Passenger Screen"); } }

Login:
import [Link].*; import [Link].*; public class Login extends ActionListener { String username = "a"; String password = "1"; TextField t1,t2; Label l1,l2,l3,l4,l5,l6; Button b2,b3,b4; GridBagLayout gbl; GridBagConstraints gbc; Font f1,f2; public Login() { Frame implements

//setTitle("Login Screen"); //g = new GridLayout(4,2,0,60); //setLayout(g); setBackground([Link]); f1 = new Font("TimesRoman",[Link],20); f2 = new Font("TimesRoman",[Link],15); gbl=new GridBagLayout(); gbc=new GridBagConstraints(); setLayout(gbl); l1 = new Label("Username",[Link]); [Link](f1); l2 = new Label("Password",[Link]); [Link](f1); l3 = new Label(""); l4 = new Label(""); l5 = new Label(""); l6 = new Label(""); t1 = new TextField(15); t2 = new TextField(15); [Link]('*'); //b1 = new Button("Change Login Details"); b2 = new Button("Reset"); [Link](f2); b3 = new Button("Submit"); [Link](f2); b4 = new Button("Close"); [Link](f2); [Link]=0; [Link]=0; [Link](l1,gbc);

add(l1); [Link]=2; [Link]=0; [Link](t1,gbc); add(t1); [Link]=0; [Link]=2; [Link](l2,gbc); add(l2); [Link]=2; [Link]=2; [Link](t2,gbc); add(t2); [Link]=0; [Link]=4; [Link](l3,gbc); add(l3); [Link]=2; [Link]=4; [Link](l4,gbc); add(l4);

[Link]=0;

[Link]=6; [Link](b2,gbc); add(b2);

[Link]=2; [Link]=6; [Link](b3,gbc); add(b3);

[Link]=0; [Link]=8; [Link](l4,gbc); add(l4); [Link]=2; [Link]=8; [Link](l5,gbc); add(l5); [Link]=0; [Link]=10; [Link](b4,gbc); add(b4); //add(l1); //add(t1);

//add(l2); //add(t2); //add(b1); //add(b2); //add(b3); //add(b4); //[Link](this); [Link](this); [Link](this); [Link](this); } /*public Insets getInsets() { return new Insets(40,40,40,40); }*/ public void actionPerformed(ActionEvent ae) { if([Link]()==b2) { [Link](""); [Link](""); } if([Link]()==b4) { [Link](0); } if([Link]()==b3) {

if(([Link]().equals(username))&&([Link]().equals(p assword))) { MainMenu m = new MainMenu(); setVisible(false); [Link](400,400); [Link](true); [Link]("Main Menu"); } else { //Warning w = new Warning(); //[Link](300,200); //[Link](true); //[Link]("Message Box"); MessageBox mb = new MessageBox(this); [Link](200,200); [Link](true); } } /*if([Link]() == b1) { Change c = new Change(); [Link](400,400); [Link](true); [Link]("Screen for Changing Login Details"); }*/ }

Reservation:
import [Link].*; import [Link].*; public class Reservation extends Frame implements ActionListener { Button b1,b2,b3; Label l1,l2; GridBagLayout gbl; GridBagConstraints gbc; Font f; Reservation() { setBackground([Link]); f = new Font("TimesRoman",[Link],20); gbl=new GridBagLayout(); gbc=new GridBagConstraints(); setLayout(gbl); b1=new Button("Check Availability"); [Link](f); b2=new Button(" Create Passenger "); [Link](f); // b3=new Button(" Fare Teller "); // [Link](f);

l1= new Label(""); l2= new Label(""); [Link]=0; [Link]=0; [Link](b1,gbc); add(b1); [Link]=0; [Link]=4; [Link](l1,gbc); add(l1); [Link]=0; [Link]=8; [Link](b2,gbc); add(b2); /* [Link]=0; [Link]=12; [Link](l2,gbc); add(l2); [Link]=0; [Link]=16; [Link](b3,gbc); add(b3); */ [Link](this);

//

[Link](this); [Link](this); addWindowListener(new W());

} public void actionPerformed(ActionEvent ae) { if([Link]()==b1) { Check m = new Check(); //setVisible(false); [Link](400,400); [Link](true); [Link]("Check Availability Screen"); } if([Link]()==b2) { Create v = new Create(); //setVisible(false); [Link](400,500); [Link](true); [Link]("Create Passenger Screen"); } /* { Fare f = new Fare(); //setVisible(false); [Link](400,500); if([Link]()==b3)

[Link](true); [Link]("Fare Teller Screen"); } */ } class W extends WindowAdapter { public void windowClosing(WindowEvent e) { setVisible(false); dispose(); }}}

Ticket:
import [Link].*; import [Link].*; import [Link].*; public class ActionListener { Ticket extends Frame implements

TextField t1; Label l1; Button b1; GridBagLayout gbl; GridBagConstraints gbc;

Connection con; PreparedStatement ps; Statement stmt; ResultSet rs; int count; Font f;

Ticket() { setBackground([Link]); t1 = new TextField(20); l1 = new Label("PNR NO "); [Link](f);

[Link]=0; [Link]=0; [Link](l1,gbc); add(l1);

[Link]=0; [Link]=2;

[Link](t1,gbc); add(t1);

addWindowListener(new W()); } public void actionPerformed(ActionEvent ae) {

class W extends WindowAdapter { public void windowClosing(WindowEvent e) { setVisible(false); dispose(); } } /* { Ticket t = new Ticket(); [Link](400,500); [Link](true); [Link]("Ticket Screen"); }*/ } public static void main(String args[])

Wating:
import [Link].*; import [Link].*;

public class Waiting extends Frame { Waiting() { addWindowListener(new W()); } class W extends WindowAdapter { public void windowClosing(WindowEvent e) { setVisible(false); //dispose(); [Link](0); }}}

Warning:
import [Link].*; import [Link].*; public class Warning extends Frame { GridLayout g; Button b1; Label l; Warning() { g = new GridLayout(2,1,10,40); setLayout(g);

l = new Label("Incorrect password",[Link]); b1 = new Button("Ok"); add(l); add(b1); [Link](new Y()); addWindowListener(new X()); } class Y implements ActionListener {

username

or

public void actionPerformed(ActionEvent ae) { if([Link]()==b1) { //dispose(); [Link](0); } } } class X extends WindowAdapter { public void windowClosing(WindowEvent e) { setVisible(false); dispose(); }

} public Insets getInsets() { return new Insets(40,40,40,40); } /*public static void main(String args[]) { Warning m = new Warning(); [Link]("Message Box"); [Link](300,200); [Link](true); }*} } import [Link].*;

Messege box:
import [Link].*; public class MessageBox extends Dialog ActionListener { GridBagLayout gbl; GridBagConstraints gbc; FlowLayout F; Button b1; Label l; Font f1,f2; MessageBox(Frame fm) implements

{ super(fm,true); setBackground([Link]); f1 = new Font("Times Roman",[Link],20); f2 = new Font("Times Roman",[Link],15); gbl=new GridBagLayout(); gbc=new GridBagConstraints(); setLayout(gbl); l=new Label("Incorrect username or password",[Link]); [Link](f1); b1 = new Button(" OK "); [Link](f2); [Link]=0; [Link]=0; [Link](l,gbc); add(l); [Link]=0; [Link]=4; [Link](b1,gbc); add(b1); setSize(350,200); setTitle("Message Box"); [Link](this); addWindowListener(new X()); } public void actionPerformed(ActionEvent ae) {

if([Link]()==b1) { setVisible(false); dispose(); } } class X extends WindowAdapter { public void windowClosing(WindowEvent e) { setVisible(false); dispose(); }}}

Main Menu:
import [Link].*; import [Link].*; public class MainMenu extends Frame implements ActionListener { MenuBar mbar; Menu m1,m2,m3; MenuItem m1_1,m1_2,m2_1,m2_2,m2_3,m3_1; public MainMenu() { mbar = new MenuBar();

setMenuBar(mbar); m1=new Menu("Bookings"); [Link](m1); m1_1 = new MenuItem("Reservation"); [Link](m1_1); m1_2 = new MenuItem("Cancellation"); [Link](m1_2); m2=new Menu("Reports"); [Link](m2); m2_1 = new MenuItem("Confirmed Passengers"); [Link](m2_1); m2_2 = new MenuItem("Waiting"); [Link](m2_2); m2_3 = new MenuItem("Daily Collection Report"); [Link](m2_3); m3=new Menu("Close"); [Link](m3); m3_1 = new MenuItem("Close"); [Link](m3_1); m1_1.addActionListener(this); m1_2.addActionListener(this); m2_1.addActionListener(this); m2_2.addActionListener(this); m2_3.addActionListener(this); m3_1.addActionListener(this); addWindowListener(new M()); }

public void actionPerformed(ActionEvent ae) { if([Link]()==m1_1) { Reservation r = new Reservation(); [Link](400,400); [Link](true); [Link]("Reservation Screen"); } if([Link]()==m1_2) { Cancellation c = new Cancellation(); [Link](400,400); [Link](true); [Link]("Cancellation Screen"); } if([Link]()==m2_1) { Confirmed cr = new Confirmed(); [Link](400,400); [Link](true); [Link]("Confirmed Passengers List"); } if([Link]()==m2_2) { Waiting wr = new Waiting();

[Link](400,400); [Link](true); [Link]("Waiting List"); } if([Link]()==m2_3) { Collection dcr = new Collection(); [Link](400,400); [Link](true); [Link]("Daily Collection Report"); } if([Link]()==m3_1) { [Link](0); } } /*public static void main(String args[]) { MainMenu m = new MainMenu(); [Link]("Main Menu"); [Link](400,400); [Link](true); }*/

class M extends WindowAdapter { public void windowClosing(WindowEvent e) { setVisible(false); dispose(); } } }

Project:
import [Link].*; import [Link].*; public class Project extends Frame { public static void main(String args[]) { Login L = new Login(); [Link](200,100); [Link](300,300); [Link](true);

[Link]("Login Screen"); } }

Screen shoot:

BOBLOGRAPHY

[Link] [Link]

You might also like