• No results found

AIRLINE RESERVATION SYSYTEM

N/A
N/A
Protected

Academic year: 2021

Share "AIRLINE RESERVATION SYSYTEM"

Copied!
124
0
0

Loading.... (view fulltext now)

Full text

(1)

BIJUPATNAIK UNIVERSITY OF TECHNOLOGY

A Project Report on

AIRLINE RESERVATION SYSTEM

Carried out at

INTERFACE SOFTWARE BHUBANESWAR

Submitted By: Khitish Kumar Das Registration No:-0805266064

The project is submitted for The Partial Fulfillment

of The Requirement for the degree of

MASTER IN COMPUTER APPLICATION (MCA)

Trident Academy

of

Creative Technology

Under the guidance of PARTHASARATHI DAS

PROJECT GUIDER OF INTERFACE SOFTWARE.

.

(2)

ACKNOWLEDGEMENT

No project reaches its destination with individual effort, similarly in my case I have been able to complete my project because of the support I have received from different avenues.

This project would not have seen the light of day without the guidance of my external guide

I extend my heartfelt thanks to him for offering his valued guidance in completing the project and also thankful for his valuable suggestion and efficient supervision in spite of having arduous schedule. The project would have ended in a prenatal stage if not for this perseverance and firm belief in my potential. This project is certainly a success because of his all around help and concern; any word of thanks would be insufficient for the assistance imparted to me.

I am also immensely thankful to our internal guide Mr. Kartik Rana faculty of MCA Department of “ TRIDENT ACADEMY OF CREATIVE TECHNOLOGY ”.

I would also like to extend our thanks to Mr.P.K Dixit for his help and also whole Interface family whose support has made our project a memorable success.

I would like to express my gratitude to Archana Panda and Niranjan Nayak, for their valuable technical assistance, and Mr. Ashish Das , Mr Raghunath Rana for their help.

Truly every day has been a learning experience for me due to the presence of all the people who have helped me to frame a better life.

(3)

ABSTRACT

The first and foremost objective of the project is to give a better service to the customer at the time of reserving the ticket of airline and eradicate the problems faced by the customer to some extent .

The Airline Reservation System (ARS) was one of the earliest changes to improve efficiency. ARS eventually evolved into the Computer Reservation System (CRS) A Computer Reservation System is used for the reservation of a particular airline and interfaces with a Global Distribution System (GDS) which supports travel agencies and other distribution channels in making reservations for the most major airlines in a single system .Airline Reservation System contain airline schedule, fare traffics, passenger reservations and ticket records. An airline’s direct distribution works within their own reservation system, as well as pushing out information to the GDS. A second type of direct distribution channel is consumers who use the internet or mobile application to make their own reservations.

The projects has successfully implemented with proper authentication and services.

There are 2 main development modules in the project. They are

1. Admin Module

2. User/Customer Module

1. Admin Module:

Admin plays the key role throughout the whole project.Admin having own username and password keeps track of the flight details and also about the customer He can approve and can also reject the booking application of the customer.

2. User/Customer Modules:

User also having his/her own username and password for log on. After log on he/she can view all the flights and their details and can book tickets as per the requirement. User can also view and edit his own profile.

(4)

TABLE OF CONTENTS

Index 1. INTRODUCTION 2. REQUIRED SPECIFICATIONS 2.1 System Study 2.2 System specification

2.3 System Requirement study 2.4 Software specification

a. Java Server Pages

b. Java Script

c. Struts Framework and Servlet. d. HTML

e. introduction to SQL Server. 3. SYSTEM DESIGN

3.1 Date base Design 3.2 Table Structures. 3.3 Data Flow Diagram.

3.4 ER Diagram. 4. IMPLEMENTATION 5. TESTING 6. CODING 7. CONCLUSION 8. APPENDIX

(5)

LIST OF TABLES

BOOKING_DETAILS

CUSTOMERDETAILS

FEEDBACK_DETAILS

FLIGHTDETAILS

LOGIN

NOTICE

PAYMENTDETAILS

REGISTRATION

(6)

LIST OF FIGURES

Data Flow Diagram

(7)

CHAPTER-1 INTRODUCTION

(8)

Introduction

Online Air Ticket Booking system is to provide an option to customers to book the tickets online and to check the confirmation online. This system will help the company to sell the flight tickets online. Unless like in the previous stage people as to walk into travel agency or this company ticket counter to buy the tickets and also to check the flight timings. This problem is over come introducing this system.

Existing System

Presently the company has ticket counters in the airport. Where people as to come

to book the tickets or to check the flight timings. Also there are many travel agents take the advance booking. In turn these agents will check out with the main ticket counter officials for the ticket confirmation. This is very lengthy and tedious process.

Proposed System

The proposed system will available online. So anybody who is interested in the flight timings and ticket booking they check online only.

Objectives of the project

1. Online air ticketing saves time by reducing the time involved in the physical transportation of the customer to the reservation counter; online air ticketing process saves time in absolute terms.

2. It enables the customer to purchase tickets from the remote areas, thereby increasing the customer-centricity of the services provided.

3. With a segment of customers opting for the online facilities, the pressure at the reservation counter is substantially reduced.

4. Reduction in the pressure at the reservation counter creates scope to curtail the number of employees at the reservation counters, contributing in cost-cut to

(9)

6. Online portal can be used to ascertain any particular facilities that the customer might be looking forward to during the journey.

7. The portal can also be used to inform the prospective customers about the future economy option and other function benefits that the company could have planned; thereby, enabling the customer to plan in advance.

8. With the induction of the cash on delivery system, the customer can easily deliver his air-tickets while being at home.

(10)

CHAPTER-2

(11)

System study is a process that is to be done before any project begins. This will held to understand how the existing system is functioning and what are the drawbacks in it once the drawbacks have been identified it will be easy to design the new system avoiding these drawbacks also system study should explain what is the need for computerization.

2.2 OVERVIEW OF THE SOFTWARE:

2.2.1. Overview of java technology History of java:

Java language was developed by James Gosling and his team at sun micro systems and released formally in 1995. Its former name is oak. Java Development Kit 1.0 was released in 1996. To popularize java and is freely available on Internet.

Overview of java:

Java is loosely based on C++ syntax, and is meant to be Object-Oriented Structure of java is midway between an interpreted and a compiled language. Java programs are compiled by the java compiler into Byte Codes which are secure and portable across different platforms. These byte codes are essentially instructions encapsulated in single type, to what is known as a java virtual machine (JVM) which resides in standard browser.

Jvm verifies these byte codes when downloaded by the browser for integrity. Jvm available for almost all OS. JVM converts these byte codes into machine specific instructions at runtime.

(12)

• Java is object-oriented language and supports encapsulation,

inheritance, polymorphism and dynamic binding, but does not support multiple inheritance. Every thing in java is an object except some primitive data types.

• Java is portable architecture neutral that is java programs once compiled can be executed on any machine that is enabled.

• JAVA is distributed in its approach and used for internet programming.

• Java is robust, secured, high performing and dynamic in nature.

• Java supports multithreading. There for different parts of the program can be executed at the same time

Java and internet:

Java is strongly associated with internet and known as internet programming language. Internet users can use java to create applet programs and run them locally using java enabled browser search as hot java. Applets can be downloaded from remote machine via internet and run it on local machine.

Java and World Wide Web:

World Wide Web is an open ended information retrieval system designed to be used in the distributed environment. This system contains web pages that provide both information and controls. We can navigate to a new web page in any direction. This is made possible worth HTML java was meant to be used in distributed environment such as internet. So java could be easily incorporated into the web system and is capable of supporting animation graphics, games and other special

(13)

Java Environment:

Java environment includes a large no. of tools which are part of the system known as java development kit (JDK) and hundreds of classes, methods, and interfaces grouped into packages forms part of java standard library (JSL).

Java Architecture:

Java architecture provides a portable, robust, high performing environment for development. Java provides portability by compiling the byte codes for the java virtual machine which are then interpreted on each platform by the runtime environment. Java also provides stringent compile and runtime checking and automatic memory management in order to ensure solid code.

Java Virtual Machine:

When we compile the code, java compiler creates machine code (byte code) for a hypothetical machine called java virtual machine (jvm). The jvm will execute the byte code and overcomes the issue of portability. The code is written and compile for one machine and interpreted all other machines. This machine is called java virtual machine.

About html:

HTML (hyper text markup language) is a language used to create hyper text documents that have hyper links embedded in them. It consists of tags embedded in the text of a document with HTML. We can build web pages or web document s. it is basically a formatting language and not a programming language. The browser reading the document interprets mark up tags to help format the document for subsequent display to a reader. HTML is a language for describing structured

documents. HTML is a platform independent. WWW (World Wide Web) pages are written using HTML. HTML tags control in part the representation of the WWW page when view with web browser. The browser interprets HTML tags in the web

(14)

document and displays it. Different browsers show data differently. Examples of browsers used to be web pages include:

• Netscape

• Internet Explorer

2.2.2. INTRODUCTION TO J2EE

Today, more and more developers want to write distributed transactional applications for the enterprise and leverage the speed, security, and reliability of server-side technology. If you are already working in this area, you know that in today's fast-moving and demanding world of ecommerce and information

technology, enterprise applications have to be designed, built, and produced for less money, faster, and with fewer resources than ever before.

To reduce costs and fast-track enterprise application design and development, the Java TM 2 Platform, Enterprise Edition (J2EETM) technology provides a

component-based approach to the design, development, assembly, and deployment of enterprise applications. The J2EE platform gives you a multitiered distributed application model, the ability to reuse components, a unified security model, and flexible transaction control. Not only can you deliver innovative customer solutions to market faster than ever, but your platform-independent J2EE component-based solutions are not tied to the products and APIs of any one vendor.

This tutorial takes an examples-based approach to describing the features and functionalities available in J2EE SDK version 1.4. Whether you are a new or an

(15)

If you are new to J2EE applications development, this chapter is a good place to start. Here you will learn the J2EE architecture, become acquainted with important terms and concepts, and find out how to approach J2EE applications programming, assembly, and deployment.

2.2.2.1 SERVLETS OVERVIEW

INTRODUCTION

Servlets extend the request-response-oriented servers, such as Java-enabled Web servers. For example, a Servlet can retrieve data from an HTML form and applying the business logic used to update Product database.

Applets used in browsers. Similarly Servlets for server.

The Servlet API assumes nothing about the server’s environment or protocol. Therefore, Servlet can be embedded in many different servers.

Client System

HTTP Server

Servlet Product Database

(16)

Uses of Other Servlets:

A Servlet can handle multiple requests concurrently, it allows Servlets to support systems and concurrently requests.

• Servlets can be used to balance load among several servers that mirror the same content, and to partition a single logical service over several servers, thus Servlets can forward requests.

Web Servers:

A Web server receives the request it then springs into action. Depending on the type of request, the webserver might look for a web page or it might execute program on the server, usually, as discussed earlier, CGI script or an advanced server-side program.

The Servlet API:

The two packages contains the code to build the Servlets: javax.servlet and javax.servlet.http

The javax.servlet package:

The javax.servlet package contains a number of interfaces and classes that establish the framework in which Servlets operate. The ServletRequest and ServletResponse are also very important.

(17)

• The ServletResponse interface is used to write data to a client response.

The Servlet Interface:

All Servlets must implement the Servlet interface. Generic Servlet must implements the Servlet and Servletconfig interface. HttpServlet extends GenericServlet. It is commonly used to Servlets that receives and process HTTP requests.

GenericServlets

ServletConfig

Servlet

(18)

The ServletRequest Interface:

The server implements the ServletRequest interface. It enables to obtain about a client request:

• The parameter of the names passed by the client, and the names of the remote host that made the request.

• Servlets use to get data from clients that use application protocols such as the HTTP POST and PUT methods in an InputStream such as ServletInputStream.

• The HttpServletRequest interface contains methods for accessing HTTP-specific header information.

The ServletResponse Interface:

The ServletResponse interface is implemented by the server. It enables to obtain about a client response:

• It allows the Servlet to set the content length.

• Servlet can send the reply data which writer through n output stream such as ServletOutputStream.

• The HttpResponse interface contains allow the Servlet to manipulate HTTP-specific header information.

Hypertext Transfer Protocol (HTTP):

The Hypertext Transfer Protocol (HTTP) is used an application-level protocol for distributed, collaborative, hypermedia information systems. A

(19)

The javax.servlet.http Package:

The javax.servlet.http package contains several interfaces and classes that are commonly used by Servlet developers.

Http Request and Responses:

The Http Requests and Responses contains in two arguments:

• An HttpServletRequest is used to enables Servlets to read data from an HTTP request.

• An HttpServletResponse is used to enables Servlets to write data to an HTTP response.

HttpServletRequest Object:

An HttpServletRequest Object provides to access the data from the client:

• The getParameter method returns the value of a named parameter and similarly the getParameterValues method returns an array of values for the named parameter.

• The getReader method returns the BufferedReader to use to read the data.

• The getInputStream method returns the ServletInputStream to use to read the data.

HttpServletResponse Objects:

An HttpServletResponse object provides the HTTP method. To access the data from the user:

• The getWriter method returns a Writer.

(20)

HTTP Header Data:

The HTTP header data means to access Writer or OutputStream. For example, the GET and POST for HTTP requests to which the service method includes:

• The handling for GET requests returns to doGet, Conditional GET and HEAD requests.

• The handling for POST requests returns to doPost.

• The handling for PUT requests returns to doPut.

• The handling for DELETE requests returns to doDelete.

Servlets Features:

Servlets are efficient when compared to any other server-side programs. They allow persistence of data to be maintained. More important is the fact they are portable, robust security features.

Servlets Better than CGI:

Servlets offer advantages over CGI in the areas of performance, portability and security. Each of these advantages will be discussed in turn:

• Performance is perhaps the most visible difference between Servlets and CGI. Since most Servlets run in the same process space as the server and are loaded only once, they are able to respond much more quickly and efficiently to client requests. In contrast, CGI must create a new process to service each new request. The overhead involved with

(21)

• Portability is another strong advantage for Servlets. Unlike many CGI applications, Servlets can be run on different servers and platforms without modifications. This characteristic can be extremely important when building enterprise-wide distributed applications.

• Servlets are much more secure than CGI. Though CGI scripts can be written in Java, they are often written in more error-prone language such as C, since C programs can inadvertently or maliciously access invalid memory locations, CGI programs are less secure. Of course, these restrictions can be lifted according to the security policies set by the Java Security Manager.

Life Cycle of Servlet:

Each Servlet has the same life cycle:

• Sever loads and initializes the servlets calls the init () method.

• The sever handles zero or more client requests calls the service () method.

• The server removes the servlets calls the destroy () method.

(22)

Initialization Parameters of Servlets:

Initialize the Servlet before client requests are handled and before the Servlet is destroyed. The Servlet runs the init method. The Servlet calls the init method when the server loads the Servlet, and similarly will not call the init method again unless the server is reloading the Servlet. After initialization, the Servlet able to handle client requests. Initialization can be accessed in two ways:

• The init method declared by the Servlet interface receives ServletConfig object as its argument. This object provides methods that enable you to read the initialization parameters.

• The getServletConfig method declared by the Servlet interface returns a ServletConfig object.

Server Server Servlet code Server Servlet code Servlet code Client Client Handle Client Request

(23)

Destroys the Servlet runs the servlet’s destroy method. The method is run once; similarly the server will not run the destroy method, when the server calls the destroy method, another thread might be running a service request. Servlets run until the server destroys them.

Communication of Servlets:

To communicate Servlets sometimes need to access network resources. HTML pages, objects shared among Servlets at the same server and other Servlets:

• The Request Dispatcher Object with other Server Resources (JSDK 2.1) such as other Servlets with HTML pages and so on.

• The resource is an object in the JAVA programming language such as Sharing Resources among Servlets (JSDK2.1).

• The other servlet’s Servlet object and calling its public such as Calling Servlet from Servlets (JSDK2.0).

Utilities For Running Servlets:

The JSDK2.0 has a utility called Servletrunner. If you can test it with the utility included in the JSDK, while JSDK2.1 comes with a small utility server.

Properties of Servlets:

The Servlet requires initialization parameters, if you set this data before starting the JSDK process that runs your Servlet.

(24)

STRUTS Why struts?

We are using struts in this project. in the present scenario of web-technology, struts plays a vital role. strut is a better structure. In standard mvc there is no clue

regarding the structure and designing. java pages being used, labels that has been used so we found the previous mvc was not at it’s best to eradicate those

problems. We are using an api and a framework

In the name of struts designed by apache.it takes the help of standard servelet api ,jsp,java.

This frame work also follows mvc architecture means it has a model component. it mix with some standard xml file. and struts defined java file.

It is a framework communication of apis, specification, where we found following major specification. 1-- jsp specification 2 --servelet specification 3--java specification 4 --xml specification 5--struts specification

Struts basically drivn by the follwing major architecture 1-- mvc

2-- Front controller model 3 --data access object model

(25)

MVC ARCHITECTURE OVERVIEW

Browser Database

. In the MVC architecture, a central servlet, known as the Controller, receives all requests for the application. The Controller then processes the request and works with the Model to prepare any data needed by the View (which is usually a JSP) and forwards the data to a JSP. The JSP then uses the data prepared by the controller to generate a response to the browser. In this architecture, the business and presentation logic are separated from each other. Having the separation of business and presentation code accommodates multiple interfaces to the application, be they web, wireless, or GUI (Swing). Additionally, this separation provides excellent reuse of code.

A CLOSER LOOK AT THE MODEL-VIEW-CONTROLLER ARCHITECTURE

Understanding of the MODEL-View-Controller architecture is crucial to understanding Struts, this section takes a closer look at each of its parts. As a point of interest, MVC is based on an older graphical user interface (GUI) design pattern that has been around for some time, with its origins in the Smalltalk world. Many

Controller(Servlet) Request Processing Data Validation Model Business Logic Data Manipulation View(JSP)

(26)

of the some forces behind MVC for GUI development apply nicely to Web development.

Model Components

In the MVC architecture, model components provide an interface to the data and /or services used by an application. This way, controller components don’t unnecessarily embed code for manipulating an application’s data. Instead, they communicate with the model components that perform the data access and manipulation. Thus, the model component provides the business logic. Model components come in many different forms and can be as simple as a basic Java bean or as intricate as Enterprise Java Beans (EJBs) or Web services.

View Components

View components are used in the MVC architecture to generate the response to the browser. Thus, a view component provides what the user sees. Often times the view components are simple JSPs or HTML pages. However, you can just as easily use WML design advantages of MVC. You can use any view technology that you’d like without impacting the Model layer of your application.

(27)

controls the way that the Model and View layers interact. The Controller often uses helper classes for delegating control over specific requests or processes.

Basic Components of Struts

The Struts framework is a rich collection of Java libraries and can be broken down into the following major pieces:

Base framework JSP tag libraries Tiles plugin Validator plugin

Base Framework

The base frame work provides the core MVC functionality and is comprised of the building blocks for your application. At the foundation of the base framework is the controller servlet ActionServlet. The rest of the base framework is comprised of base classes. Most prominent among the base class are the Action and ActionForm classes. These two classes are used extensively in all Struts applications. Action classes are used by Action servlet to process specific requests. Action Form classes are used to capture data from HTML forms and to be a conduit of data back to the View layer for page generation.

JSP Tag Libraries

Struts comes packaged with several JSP tag libraries for assisting with programming the View logic in JSPs. JSP tag libraries enable JSP authors to use HTML-like tags to represent functionality that is defined by a java class.

(28)

Following is a listing of the libraries and their purpose;

HTML Used to generate HTML forms that interact with the Struts APIs.

Bean Used to work with Java bean objects in JSPs, such as accessing bean values. Logic used to cleanly implement simple conditional logic in JSPs.

Nested Used to allow arbitrary levels of nesting of the HTML, Bean, and logic tags that otherwise do not work.

Tiles Plug-in

Struts come packaged with the Tiles sub framework. Tiles is a rich JSP templating framework that facilitates the reuse of presentation (JTML) code. With Tiles, JSP pages can be broken up into individual tiles or pieces and then glued together to create one cohesive page. Similar to the design principles that the core Struts framework is built on, Tiles provides excellent reuse of View code

Validator Plug-in

Struts come packaged as of version 1.1, with the Validator sub framework for performing data validation. Validate provides a rich framework for performing data validation on both the server side and client side. Each validation is configured in an outside XML file so that validations can easily be added to and removed from an application declaratively versus being hard-coded into the application. Similar to Tiles, prior to Struts 1.1, validator was a third party ass-on, but has since been included in the project and is more tightly integrated.

(29)

STRUTS AND THE VIEW LAYER

Struts provide a rich set of functionality and features for developing the View layer of MVC applications. There are several forms that the View layer of a Struts application can take. It can be HTML/JSP (the most common case) or it can be XML/XSLT, Velocity, Swing, or whatever your application requires. This is the power of Struts and MVC. Because HTML/JSP is the typical view technology used for Java-based Web applications Struts provides the most functionality and features for developing your application this way. The remainder of this chapter focuses on Struts support for creating the view layer using HTML/JSP.

Struts HTML/JSP view layer support can be broken down into the following major components: JSP pages Form Beans JSP tag libraries Resource bundles JSP PAGES

JSPs are the centerpiece of the Struts view layer. They contain the static HTML and JSP library tags that generate dynamic HTML. Together the static and dynamically generated HTML gets sent to the user’s browser for rendering. That is, the JSPs contain the code for the user interface with which a user interacts. JSPs are the centerpiece of the Struts View layer. They contain the static HTML and JSP library tags that generate dynamic HTML. Together the static and dynamically

(30)

generated HTML gets sent to the user’s browser for rendering. That is, the JSPs contain the code for the user interface with which a user interacts.

JSPs in Struts applications are like JSPs in any other java-based Web application. However, to adhere to the mvc paradigm, the JSPs should not contain

any code for performing business logic or code for directly accessing data sources. Struts provide a set of tag libraries that supports displaying data and creating HTML forms that capture data. Additionally, the tags support displaying content stored in resource bundles. The JSP tag libraries glue those two together and the resource bundles provide a means of content management.

FORM BEANS

Form Beans provide the conduit for transferring data between the view and controller layers of Struts applications. When HTML forms are submitted to a Struts application, Struts takes the incoming form data and uses it to populate the form’s corresponding form Bean. The Struts Controller layer then uses the Form Beans to access data that must be sent to the Model layer. On the flip side, the Controller layer populates form Beans with Model layer data so that it can be displayed with the View layer. Essentially, Form Beans are simple data containers. They either contain data from an HTML form that is headed to the Model via the controller or contain data from the Model headed to the View via the controller.

(31)

Each sublayer does not necessarily represent a separate set of classes, but rather the Model’s set of responsibilities. You may choose to house a specific function’s code for all layers in one layer class, or you may break down each sublayer into fine-grained objects. The level of object granularity is up to y9u and

what’s best and or necessary really depends on the size and complexity of your application. The following are the three sublayers:

External interface Composed of code that provides and interface that external code uses to interact with the Model.

Business logic encompasses the bulk of the Model code and provides the business functionality for an application.

Data access Composed of code for communicating with an application’s data sources such as a database.

STRUTS AND THE MODEL

The struts framework does not provide any specific features or constraints for developing the Model layer of your application. At first glance this may seem odd, or even a shortcoming, given that Struts is designed for building MVC applications. However, it’s a actually a key design feature of struts and is a great benefit. By not dictating how the Model layer should be bui9lt, struts gives your application the flexibility to use any approach or technology for building the Model layer code. Whether it be Enterprise java Beans, Java Data Objects (JDO), or the Data Access Objects (DAO) pattern, struts will accommodate.

Because the model defines the business logic, the model is where struts ends and your application code begins. Your Model code will be accessed from subclasses of Struts Action object that are part of the Controller layer of the Struts

(32)

framework. Action subclasses interact with the model via Action’s interfaces and use its Data Transfer Objects to pass and retrieve data.

You should not place any business logic or data access code in Action objects. Doing so would bypass the separation of the Model and the Controller. Similarly, your Model code should not have any ref4erences to Struts code or objects. Violating this rule unnecessarily couples your core application code to Struts.

STRUTS AND THE CONTROLLER LAYER:

Struts provide a robust Controller layer implementation that has been designed from the ground up to be extensible. At its core is the Controller servlet, Action Servlet, which is responsible for initializing a Struts application’s configuration from the struts configuration file and for receiving all incoming requests to the application. Upon receiving arequest, action Servlet delegates its processing to the Request Processor class. The Request Processor class processes all aspects of the request, including selecting the Form Bean associated with the request, populating the Form Bean with data, validating the Form Bean, and then selecting the correct Action class to execute for the request. The Action class is where the Struts framework ends and your application code begins. Action classes provide the glue between the View and Model layers.

(33)

UNDERSTANDING THE FLOW OF EXECUTION

1.HTTP request

7.Produce HTTP Response

2.Create Form Bean 5.Create Result Beans 4.Call DAO Method

Controller

3.Call Action with Form

View 6. Forward to JSP file Model DB Struts Controller Action Servlet Action Class

Form bean Result bean Data Access Object (DAO)

(34)

It is necessary to describe the way that execution takes place. Struts uses the Model-View-Controller design pattern,. The MVC architecture defines a specific flow of execution. An understanding of this flow of execution is crucial to and overall unders6snding of struts. For Mine HR, execution proceeds in the following way:

The flow of execution for any Struts application as shown here.

1. The browser makes a request to the Struts application that is processed by Action Servlet (controller).

2. Action Servlet (Controller) populates the Action form (View) object with HTML form data and invokes it’s validate () method.

3. Action Servlet (controller) executes the Action object (Controller)

4. Action (Controller) interfaces with model components and prepares data for view.

5. Action (Controller) forwards control, to the JSP (VIEW).

(35)

Java database connectivity (jdbc) Jdbc and Odbc in java:

Most popular and widely accepted database connectivity called Open Database Connectivity (ODBC) is used to access the relational databases. It offers the ability to connect to almost all the databases on almost all platforms. Java applications can also use this ODBC to communicate with a database. Then we need JDBC why? There are several reasons:

• ODBC API was completely written in C language and it makes an extensive use of pointers. Calls from Java to native C code have a number of drawbacks in the security, implementation, robustness and automatic portability of applications.

• ODBC is hard to learn. It mixes simple and advanced features together, and it has complex options even for simple queries.

• ODBC drivers must be installed on client’s machine.

Architecture of JDBC:

JDBC Architecture contains three layers:

JDBC Application

JDBC Drivers

(36)

 Application Layer: Java program wants to get a connection to a database. It needs the information from the database to display on the screen or to modify the existing data or to insert the data into the table.  Driver Manager: The layer is the backbone of the JDBC architecture.

When it receives a connection-request form.

 The JDBC Application Layer: It tries to find the appropriate driver by iterating through all the available drivers, which are currently registered with Device Manager. After finding out the right driver, it connects the application to appropriate database.

 JDBC Driver layers: This layer accepts the SQL calls from the application and converts them into native calls to the database and vice-versa. A JDBC Driver is responsible for ensuring that an application has consistent and uniform m access to any database.

When a request received by the application, the JDBC driver passes the request to the ODBC driver, the ODBC driver communicates with the database, sends the request, and gets the results. The results will be passed to the JDBC driver and in turn to the application. So, the JDBC driver has no knowledge about the actual database, it knows how to pass the application request o the ODBC and get the results from the ODBC.

The JDBC and ODBC interact with each other, how? The reason is both the JDBC API and ODBC are built on an interface called “Call Level Interface” (CLI). Because of this reason, the JDBC driver translates the request to an ODBC call. The ODBC then converts the request again and presents it to the database. The results of the request are then fed back through the same channel in reverse.

(37)

Structured Query Language (SQL):

SQL (Pronounced Sequel) is the programming language that defines and manipulates the database. SQL databases are relational databases; this means simply the data is store in a set of simple relations. A database can have one or more table. You can define and manipulate data in a table with SQL commands. You use the data definition language (DDL) commands to creating and altering databases and tables.

You can update, delete or retrieve data in a table with data manipulation commands (DML). DML commands include commands to alter and fetch data.

The most common SQL commands include commands is the SELECT command, which allows you to retrieve data from the database.

In addition to SQL commands, the oracle server has a procedural language called PL/SQL. PL/SQL enables the programmer to program SQL statement. It allows you to control the flow of a SQL program, to use variables, and to write error-handling procedures

(38)

3. SYSTEM DESIGN AND DEVELOPMENT

3.1. System design:

The design of a system produces the details that state how a system meet the requirements identified during system analysis. System specialists often refer to this stage as logical design, in contrast to the process of developing program software, which is referred to as physical design.

Data Flow Diagrams have been used in the design of the system. Data Flow Diagram is a graphical tool used to describe and analyze the movement of data. The transformation of data from input to output, through processes may be described logically using these Data Flow Diagrams.

The DFD shown to the user must represent only the major functions being performed by the system. This is called Top Level DFD. If this process is complex enough, it can be broken further into different levels. This process can be continued till the process is simple. This is called the leveling of DFD’s.

3.2. Database design:

The main objective of designing a database is

• Data Integration

• Data Integrity

(39)

Data Integrity:

Data Integrity means storing all the data in a singly place and allow each application to access it. This approach results in more consistent, on update being sufficient to achieve a new record status for all the applications, which use it. Data Independence:

Data Independence is the insulation of application programs from changing aspects of physical data organization. This objective seeks to allow changes in the content and organization of physical data with out reprogramming of applications and to allow modifications to application programs with out reorganizing the physical data.

3.2.1. Normalization:

Data structuring is refined through a process called normalization, is a formal process of developing data structures in a manner that eliminates redundancy and promotes integrity. It is a step-by –step decomposition of complex records into simple records to reduce redundancy, inconsistency and removes anomalies.

There are several normal forms to be followed in the normalization process .The most important and widely used are:

• First Normal Form

• Second Normal Form

• Third Normal Form 3.2.1.1 First Normal Form (1 NF):

A table is said to be in the first normal form, if the intersection of any column and row contains only value.

Identify a suitable identifier from the pool of UN normalized data. Remove any item that repeat with in a single value of this key to another relation bringing with them .The identifier key to form part of a new composite key in the relation.

(40)

3.2.1.2 Second Normal Form (2 NF):

For a table to be in the second normal form it should be in the first normal form and the values in every column are functionally depend upon the primary key. 3.2.1.3 Third Normal Form (3 NF):

For a table to be in the third normal form it should be in the second normal form and the values in every non-key column are not transitively depend upon on the primary key

3.2

Table Structures

Table name : Login

Purpose : stores users name, password and type Primary key : Slno

Column Name Data type Size

Slno Number 22

Username Varchar 4000

Password Varchar 4000

(41)

Table name : Booking_Details Purpose : stores booking detail. Primary key : Bid

Column Name Data type Size

Bid Number 22 Date_of_booking Varchar2 4000 Date_of_journey Varchar2 4000 Class Varchar2 4000 No_of_seat Number 22 Cid Number 22 Fid Number 22

Full Name Varchar2 4000

Address Varchar2 4000 Mob_no Number 22 Dd/Cheque/Scrool no Varchar2 4000 Flight_from Varchar2 4000 Flight_to Varchar2 4000 Flight_name Varchar2 4000 Mode_of_payment Varchar2 4000

Table name : Notice

Purpose : stores notices Primary key : Notice_no

Column Name Data type Size

Notice_no Number 22

Subject Varchar2 4000

Content Varchar2 4000

Date_of_notice Varchar2 4000

(42)

Table name : Feedback_details Purpose : stores feedbacks Primary key: Feedback_no

Column Name Data type Size

Feedback_no Number 22

Comments Varchar2 4000

Suggestion Varchar2 4000

Date_of_feedback Varchar2 4000

Name Varcahr2 4000

Table name : Paymentsdetails

Purpose : stores payments details Primary key :pid

Column Name Data type Size

Pid Number 22

Bid number 22

Date_of_payments date 7

Paymentmode varchar 4000

(43)

Table name : Customer_details Purpose : stores customer details Primary key : Customerid

Column Name Data type Size

Customer_id number 22 Name Varchar2 4000 Address Datetime2 4000 Email Varchar2 4000 Gender Varchar2 4000 Phono Varchar2 4000 Cid number 22

Table name : Flightdetails

Purpose : stores flight details Primary key : Fid

column Name Data type Size

Fid number 22 Fname Varchar2 4000 Flt_from Varchar2 4000 Flt_to Varchar2 4000 Deparature_time number 22 Arrival_time number 22 Available number 22 Price number 22 Class Varchar2 4000

(44)

Table name : Registration

Purpose : stores new user details Primary key :Rid

Column Name Data type Size

Rid number 22 Fname Varchar2 4000 Lname Varchar2 4000 Gender Varchar2 4000 Email Varchar2 4000 Address Varchar2 4000 Mob_no number 22 Slno number 22

(45)

Definition:

A data flow diagram is a graphical technique that depicts information flow and the transforms that applied as data move from input to output. The Data flow diagram used to represent a system or software at any level of abstraction. In fact DFDs may be portioned into levels.

A level of DFD, also called a context model, represents the entire software elements as a single bubble with input and output by arrow. A level of DFD is portioned into several bubbles with inter connecting arrows. Each of the process represented at level one is sub function of the over all depicted in the context model.

The DFD Notations:

Hardware person and other program

Information of the system to be modeled.

Data Item(s): Arrowhead indicates the direction of flow

Stored Information that is used by the s/w

Level 0:

External Entity

Process

(46)

DATA FLOW DIAGRAM FOR OVERALL SYSTEM AIRLINE RESRVATION SYSTEM

LOGIN

ADMIN

USER

DATABAS

E

(47)

Level-0

INPUT

DATASTORE (0.0)

(48)

LEVEL - 1

1

ST

LEVEL DFD (FOR LOGIN)

User Name Password Type

LOGIN

1

ST

LEVEL DFD (FOR REGISTRATION)

Customer Details (1.0) LOGIN Login Successfully (1.1) REGISTRATION Login Successfully

(49)

2

nd

LEVEL DFD (FOR VALID ADMIN)

Flight Management

(2.0.1)

View Customer(2.0.2)

VALID ADMIN

View Booking(2.0.3)

View Feedback(2.0.4)

Give announcement(2.0.5)

2

nd

LEVEL DFD (FOR FLIGHT MANAGEMENT)

ADD FLIGHT (2.0.1.0) FLIGHT MANAGEMENT

EDIT FLIGHT(2.0.1.1)

DELETE FLIFHT(2.0.1.2) (2.0)

PROCESS

(2.0.1)

PROCESS

(50)

2

nd

LEVEL DFD (FOR ADD FLIGHT)

FLIGHT NAME FLIGHT NO FROM TO ARRIVAL TIME DEPARATURE TIME CLASS SEAT AVAILABLE PRICE

FLIGHTDETAILS

2

nd

LEVEL DFD (FOR EDIT FLIGHT)

SELECT FLIGHT VIEWED

FLIGHTDETAILS (2.0.1.0)

ADD FLIGHT

SUCESSFULLY ADDED (2.0.1.1) SEARC H UPDATED SUCCESSFULY UPDATE FLIGHT

(51)

2

nd

LEVEL DFD (FOR VIEW CUSTOMER)

SELECT CUSTOMER VIEWED

CUSTOMERDETAILS

2

nd

LEVEL DFD (FOR VIEW BOOKING)

SELECT CUSTOMER VIEWED

BOKING_DETAILS

(2.0.2) VIEW CUSTOMER VIEWED SUCESSFULLY (2.0.3) PROCESS VIEW BOOKING VIEWED SUCCESSFULLY

(52)

2

nd

LEVEL DFD (FOR VIEW FEEDBACK)

SELECT NAME VIEWED

NOTICE

2

nd

LEVEL DFD (FOR ANNOUNCEMENT)

SELECT DATE VIEWED

(2.0.4) PROCESS VIEW BOOKING FEEDBACK VIEWED SUCCESSFULLY (2.0.5) PROCESS VIEW BOOKING ANNOUNCEMENT VIEWED SUCCESSFULLY

(53)

3

rd

LEVEL DFD (FOR VIEW BOOKING)

MY PROFILE (3.0.1)

CHANGE PASSWORD(3.0.2)

VIEW FLIGHT(3.0.3) VALID USER

MY BOOKING(3.0.4)

CANCELLATION(3.0.5) GIVE FEEDBACK(3.0.6) VIEW ANNOUNCEMENT(3.0.7)

3

rd

LEVEL DFD (

FOR MY PROFILE

)

MY PROFILE EDIT PROFILE(3.0.1.0) DELETE PROFILE(301.1) (3.0)

PROCESS

(3.0.1)

PROCESS

(54)

3

RD

LEVEL DFD (FOR EDIT PROFILE)

SELECT NAME EDITED

CUSTOMERDETAILS

3

RD

LEVEL DFD (FOR DELETE PROFILE)

SELECT NAME DELETED

CUSTOMERDETAILS

(3.0.1.0) PROCESS UPDATED SUCCESSFULLY (3.0.1.1) PROCESS DELETED SUCCESSFULLY

(55)

4

TH

LEVEL DFD (FOR NOTICE MANAGEMENT)

ADD NOTICE(4.0.1) ADMIN EDIT NOTICE(4.0.2)

DELETE NOTICE(4.0.3)

4

TH

LEVEL DFD (FOR EDIT NOTICE)

SELECT NOTICE MODIFIED

NOTICE

(4.0)

PROCESS

(4.0.2)

PROCESS

NOTICE MODIFIED SUCCESSFULLY

(56)

3.4 ER-DIAGRAM

LOGIN SLNO US ER NA ME PA SS W O RD T Y P E CUSTOMERDETAILS CUSTO MERID NAME ADD RESS EM AIL

GENDER PHO

NEN O CID BOOKING_DETAILS BID CID DATE_OF_BOOKIN DATE_OF_JOURNY CLASS NO_OF_SE AT S FID FULL_NAM E ADDRESS O FLIG HTTO FLIGHTNAME MODE_OF_PA Y HAS A HAS A

(57)

PAYMENTDETAILS PID BID DATE_OF_PAYMEN T PAYMENTMODE ACCOUNTNO FLIGHTDETAILS FID FNAME FLT_FROM FLT_TO ARRIVALTIME AVAILLABL E PRICE CLASS NOTICE NOTICENO SUBJECT CONTEN T DATE_OF_NOTICE USERNAM E FEEDBACK_DETAILS FEEDBACK_NO COMMENTS SUGGESTION DATE_OF_FEEDBACK NAME

(58)

4. SYSTEM TESTING AND IMPLEMENTATION 4.1. System testing:

Theoretically, a new designed system should have all the pieces in working order, but in reality, each piece works independently. Now is the time to put all pieces into one system and test it to determine whether it meets the user’s requirements. The purpose of the system is to consider all the likely variations to which it will be subjected and then push the system to its limits. It is tedious but necessary step in system development. One needs to be familiar with the following basic terms.

• UNIT TESTING: Unit Testing is testing changes made in an existing or a new program.

• SEQUENTIAL OR SERIES TESTING: Sequential or Series Testing is checking the logic of one or more programs in the candidate system, where the output of one program will affect the processing done by another program.

• SYSTEM TESTING: System Testing is executing a program to check logic changes made in it and with the intention of finding errors making the program fail.

• ACCEPTANCE TESTING: Acceptance Testing is running the system with live data by the actual user of the system.

Testing is vital to the success of the system. System testing makes a logical assumption that if all the parts of the system are correct, the goal will be successfully achieved. In adequate testing or no-testing leads to errors that may not appear until months later. Another reason for system testing is its utility as a

(59)

tester(designer, programmer, or user) who has developed some computer mastery can bridge this barrier.

4.1.1 Unit Testing:

This focuses on the smallest unit of software design. The module using the details design description as a guide; important control paths are tested to uncover errors within the boundary of the module.

Unit test consideration:

The module interface id tested to ensure that information properly flows into and out of the program unit under test. The local data structures are examined to ensure that the data stored temporarily maintains it integrity during all steps in an algorithm execution. Boundary conditions are tested to ensure that the module operates properly at boundaries established to limit or restrict processing. The test of data flow across a module interface is required before any other test. If data do not enter and exit properly, all other tests are moot.

Unit Procedure:

 Unit test is normally considered adjunct to the coding style.

 After source level code has been developed, reviewed and verified for correct syntax, unit test case design begins. Each test case should be coupled with a set of expected results.

 Normally, a driver is a “main program” that accepts test case data, passes such data to the module to be tested and prints the relevant results. Stubs serve to replace modules that are subroutines called by the module to be tested. A Stub or ‘dummy stub program’ uses the subroutine module’s interface to do minimal data manipulation and returns.

(60)

Unit testing is simplified when a module with high cohesion is designed. When a module addresses only one function, the number of test cases is reduced and errors can be more easily predicted and uncovered.

4.1.2 Integration Testing:

Integration is a systematic technique for constructing the program structure, while at the same time conducting tests to uncover errors associated with interfacing. The objective is to make unit-tested modules and build a program structure that has been dictated by design. Incremental integration is the program that is the program that is constructed and tested in small segments where errors are easier to isolate and correct.

Top down Integration:

Top-down integration is an incremental approach to the construction of program structure. Modules are integrated by moving downward through the control hierarchy, beginning with the main control module. Module subroutine to the main control module is incorporated into the structure either in a depth-first manner is engaged for this system. Breadth-first incorporates all modules directly subroutine at each level, moving across the structure horizontally.

The integration process is performed in a series of five steps:

 The main control module is used as a test driver and stubs are substituted for all modules directly subroutine to the main control module.

(61)

 On the completion of each set of test, another stub is replaced with the real module.

 Registration testing is conducted to ensure that new errors have not been introduced.

4.1.3 Validation testing:

At the end of integration testing, the system is completely assembled as a package with interfacing errors corrected after which a final series of software tests namely validation testing begins. Validation succeeds when the software functions in a manner that can be reasonably expected by the user.

Criteria:

Software validation is achieved through black box tests that demonstrate conformity with requirements.

4.1.4 System Testing:

System testing is actually a series of different tests whose primary purpose is to fully exercise the computer-based system. Although each test has a different purpose, all work should verify that all system elements have been properly integrated and perform allocated functions. Being the most important test, the performance test is covered briefly below:

Performance Testing:

For real-time systems, software that provides required function but does not conform to performance requirement is unacceptable. Performance testing is designed to test the run-time performance of software within the context of an integrated system. Performance testing occurs throughout all steps in the testing process. Even at the unit level, the performance of an individual module may be accessed as tests are conducted. However, it is not until all system elements are fully integrated that the true performance of a system can be ascertained.

(62)

4.1.5 Debugging:

Debugging is not testing not occurs as a consequence of testing, that is when a test case uncovers an error, debugging is the process that results in the removal of the error.

Normally three categories for debugging approaches are proposed:

 Brute force  Back-tracking  Cause-elimination

4.1.5.1 Brute force:

This is the most common and least efficient method for isolating the cost of a software error. Brute-force debugging method is usually applied when all else fails. Using a “let the computer finding the error” philosophy, memory-dumps are taken, runtime traces are invoked and the program is loaded with WRITE (in this case message box) statements. In the information that is produced, a clue is found leading to the cause of the error.

4.1.5.2 Back-tracking:

This is fairly common debugging approach that can be used successfully in small programs. Beginning at the site where a symptom has been uncovered, the source code is traced backwards (manually) until the site of the cost is found.

(63)

Cause-Elimination:

This approach is manifested by induction/deduction and introduces the concept of ‘binary partition’. A ‘cause hypothesis’ is devised and the error related data are used to prove or disprove the hypothesis. Alternatively, a list of all possible causes is developed, and tests are conducted to eliminate each. If initial tests indicate that a particular cause hypothesis shows promise, that data are refined in an attempt to isolate the path.

Each of the debugging approaches can be supplemented with debugging tools. A wide variety of debugging compilers, dynamic debugging aids (tracers), automatic test case generators, memory dumps and cross-reference maps can be applied. However, tools are not a substitute for careful evaluation, based on a complete software design document and clear source code.

4.2. System implementation

After proper testing and validation, the question arises whether the system can be implemented or not. Implementation includes all those activities that take place to convert from the old system to the new. The new system may be totally new; replacing an existing module or automated system, or it may be major modification to an existing system. In either case proper implementation is essential to provide a reliable to provide a reliable system to meet organization requirements.

All planning has now, be completed and the transformation to a fully operational system can commence. The first job will be writing, debugging documenting of all computer programs and their integration into a total system. The master and transaction files are decided, and this general processing of the system is established. Programming is complete when the programs conformed to the detailed specification.

(64)

When the system is ready for implementation, emphasis switches to communicate with the finance department staff. Open discussion with the staff is important form the beginning of the project. Staff can be expected to the concerned about the effect of the automation on their jobs and the fear of redundancy or loss of status must be allayed immediately. During the implementation phase it is important that all staff concerned be apprised of the objectives of overall operation of the system. They will need shinning on how computerization will change their duties and need to understand how their role relates to the system as a whole. An organization-training program is advisable; this can include demonstrations, newsletters, seminars etc.

The department should allocate a member of staff, who understands the system and the equipment, and should be made responsible for the smooth operation of the system. An administrator should coordinate the users to the system.

Users should be informed about new aspects of the system that will, affect them. The features of the system explained with the adequate documentation. New services such as security, on-line application from the back-ups must be advertise on the staff when the time is ripe.

Existing documents such as employee loan details should be entered into the new system. Since these files are very large, conversion of these may continue long after the system based on current files has been implemented. Hence we need to assign responsibility for each activity.

The system may come into full operation via number of possible routes. Complete change over at one point time is conceptually the most tidy.

(65)

A phased approach gives the staff time to adjust to the new system. But depends on being able to split the system, without reliance on it. Thus approach is sensible when the consequences of failure are disastrous, but will require extra staff time. The fourth angle, is pilot operation permits any problems to be tackled on a smaller scale operation. Pilot operation generally means the implementation of the complete system, but at one location or branch only.

(66)

Screen shot:

Login.jsp

Description : This page comes first when you run this projects. This page is by defult call index.jsp page.

(67)

AdminHome.jsp

Description :This page comes after inputing correct username, password and type then clicking the Login button on Login page.

Fields :

Login -: Login id of admin Password -: password of admin

(68)

Registration.jsp

Description: This page comes after clicking NewUser hyperlink at the Login page. This page is for the registration of new user by filling required fields available and all the data giving by the users through this page will store in database.

(69)

UserHome.jsp

Description: This page comes after inputting correct username, password and type then clicking the Login button on Login page.

Fields:

Login -: Login id of user. Password -: password of user.

(70)

ViewFlight.jsp

Description: This page comes after clicking the Attributes of user . It gives all the information of the flight.

(71)

GiveFeedback.jsp

Description: This page is for storing the feedback given by the customer.

Fields:

Name- Customer Name.

Comments-Comments given by the Customer. Suggestion- Suggestion given by the Customer.

(72)

ViewCustomer.jsp

Description: This page comes after clicking the Attributes of Admin i.e View Customer. It gives the details of Customers.

Fields:

Customer Name: Name of Customer. Address: Address of Customer.

(73)

Annoucement.jsp

Description: This page comes after clicking the Attributes of Admin i.e. Give Announcement. It gives the details about the Announcement.

(74)

ViewBooking.jsp

Description: This page comes after clicking the Attributes of Admin i.e View Booking. It gives details of the booking of ticket.

(75)

ChangePassword.jsp

Description: This page comes after clicking the attribute of user i.e. Change Password. This page changes the old password of a User.

(76)

DEVELOPMENT PROCESS

2.1. PROJECT LIFE CYCLE

The Software Development Life Cycle (SDLC) is the process by which software is created. Some companies don't have anything more than an ad hoc approach to software development, but these environments still have an SDLC-it's just a bad one. Likewise, each company that has a formal SDLC probably has its own, unique flavor of the SDLC. Sometimes the SDLC is a very complicated, detailed approach that requires a whole team of project managers just to keep going. The lifecycle of a project may include the following steps:

.

By applying this simple set of definite steps and deliverables at the outset and relating this to a transparent time and cost structure, we provide clients with an effective framework against which to measure expectation, quality, progress and cost for their project.

(77)

2.2. DEVELOPMENT PROCESS

Waterfall Model

Planning the development process involves several important considerations. The first consideration is to define a product life-cycle model.A software LIFE-CYCLE model encompasses all activities required to define, test, and develop.

Design- v&v Implementation-v&v Requiremen t analysis- Testing- v&v Maintenance-v&v

References

Related documents