Beruflich Dokumente
Kultur Dokumente
Project Report
Author
A.ALANAZI
07169574
Table of content
Abstract...........................................................................................................................4
Acknowledgement........5
Chapter 1: Introduction........6
1.1 Background to the Project....6
1.2 Project Objectives.....6
1.3 Overview of This Report......7
Chapter 2: Literature review and background research.........10
2.1 Pricing Factors.....15
2.1.1 Jet Fuel.....................................................................................................16
2.1.2 Season..............19
2.1.3 Time of flight................19
2.1.4 Time of Purchase............19
2.1.5 Day of Flight.................24
2.1.6 Route popularity...............28
2.1.7 Plane Loads..............28
2.1.8 Airport Congestion...............28
2.1.9 Local Events.................29
Chapter 3: Requirements................31
3.1 Interview Technique................31
3.2 Survey...............31
3.3 Questionnaire ..............31
3.4 Functional Requirements..............................................................................32
3.5 None Functional Requirements.............33
Chapter 4: Methodology..............34
Chapter 5: Analysis..............35
5.1 Domain Analysis..............35
5.2 Use Case..............35
Chapter 6: Design............................................................................................................37
6.1 Prototype Modelling............37
6.1.1 Main Page Layout...........39
6.1.2 Select Flight Page...........40
6.2 Object Modelling.............40
6.3 Modelling Behaviour of the prototype..........44
6.4 ER Modelling...................................................................................................45
6.5 Normalization...................................................................................................46
Chapter 7: Implementation .............51
7.1 Data Layer.....................................................................................................51
7.2 Presentation Layer...........52
7.3 Business Layer.............54
Chapter 8: Testing ...........................................................................................................56
8.1 Unit Testing...............56
8.2 System Testing.............57
Chapter 9: Critical Appraisal ..............58
9.1 Evaluation of Project against Objectives..........58
9.2 Heuristic Evaluation ...........60
Chapter 10: Conclusion...................................................................................................62
2
Table of figures
index
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
Figure
Figure 2.1: Jet Fuel Price
Figure 2.2: Fuel Cost and Consumption
Figure 2.3: Fourth Quarter Average
Figure 2.4: Flight prices for 26 week ahead
Figure 2.5: Price reduction for the first 26 week ahead
Figure 2.6: Flight prices LHR - JFK
Figure 2.7: Weekends and weekdays prices and trends (London Amsterdam)
Figure 2.8: Weekends and weekdays prices and trends(London-Zurich)
Figure 2.9: Weekends and weekdays prices percentage average prices
Figure 4.1: Process Structure of RUP
Figure 5.1: Admin use case
Figure 5.2: Customer use case
Figure 6.1: Fly BMI System
Figure 6.2: Easy Jet System
Figure 6.3: Main page layout
Figure 6.4: Select Flight page
Figure 6.5: Presentation Layer
Figure 6.6: Data Layer
Figure 6.7: Business Layer
Figure 6.8: Customer modelling behaviour
Figure 6.9 :Flight location new tables
Figure 6.10 :Payment new tables
Figure 6.11: Database diagram before normalization
Figure 6.12: Database diagram after normalization
page
17
17
18
22
23
24
26
27
27
34
36
36
38
38
39
40
41
42
43
44
47
48
49
50
Abstract
The airline industry is characterised by rapid change, innovation and new technology. It is a
dynamic growth industry which archives millions of dollars each year. My focus is on the factors
that enter into determining a fare rate, whether domestic or international. Two broader terms
are used when we talk about these factors i.e. Cost of Service and Value of Service. The first
one is easy to get as it says that airline should only have to charge against its services and by
value of service it means that a carrier should charge what the traffic will bear. Fare rates are
determined by a complex interaction of both Cost of Service and Value of Service. The
project aims to develop an airline reservation system which will provide customers a facility to
reserve there tickets without any hassle. It is a web based system developed using current
software industry standards which gives its users most of the online. The secondary aim of this
project develop a pricing algorithm for my application based on the current pricing system
which airlines are using and the factors which impact these pricing systems.
Acknowledgment
I would like to thank my family who always support me in my study. They were the reason that
keeps me go further and to be successful in my life. Also I would like to take the chances to
thank my supervisor Dr. Rene, who was the light that I use in the darkness which guides me to
the right way. He has been the most helpful to me and supports me when I need him. Finally I
would like to thank the University of Hertfordshire and its staff that provide us a perfect
environment and good facility to help us in our projects and researches.
Chapter 1: Introduction
1.1 Project Background
The basic intend of this project is to build up an Airline Reservation System which will help
people to book tickets for their trips. Airline reservation system is complex system and making
it to be managed by software system instead of human will help to avoid a big percents of
mistakes. It will make process of scheduling trips more easer and prevent conflicting in times,
also it will help customers to book their tickets from their homes and the pricing system will be
automated to increase and decrease depending of the season and availability and time of
booking, also depending of the class that customer select and all these factors will be calculated
automatically and instantly. It will be a web based system which will be available 24/7 to allow
customers to book their tickets anytime. I have divided this project into two major phases
which are
Software Development
For the software development I have adopted Rational Unified Process (RUP) as the
development process and Prototype as development model. For implementation I have
used N tier architecture which is a standard now a day for the development of web
solutions.
direction. I have divided my project objectives into two parts; Core and Advance. My core
objectives are those which I must need to achieve to do this project successfully and advance
objectives are the ones which I will attempt based on the time frame of this project.
Following are the main tasks to be performed to achieve the objective of this project.
Identify all the user, software and system requirements for the Airline Reservation
System.
Use current software development process and model for the development of the
system.
Design and implement a website which will cover initial requirements of the system.
These milestones gradually produce the final objective of the project to develop a system that
could handle the complex procedures of flight reservation system that
Giving customers a price comparison for the trip they want to book.
The advanced objective of this project is to include an automatic price update using a model
that is based on observations from a real airline company.
1.3 Project Overview
Below I have mentioned the structure of my dissertation which describes the way I have done
my research and applied it on the development of prototype.
Chapter 1: Introduction
The first chapter provides user an understanding about the project scope, problem area and the
structure which would be followed in the dissertation. I have also set the basic and advance
objectives of the project in this chapter.
Chapter 2: Literature Review
The main areas of my research focus on determining the factors which impact on the ticket
pricing and developing understanding how my system will do pricing. In this section I will
investigate the background of flight reservation system and pricing factors and impacts of these
factors.
Chapter 4: Methodology
For development of any software application we must have to adopt some kind of technique
which handles all the project development phases. To handle the project development life cycle
I have used Rational Unified Process and the model which I adopted is prototype model. I have
discussed both of them in this chapter and also provided reasons why I have selected these
two.
Chapter 5: Analysis
Design and analysis is always an important phase of the project. More strong the design and
analysis are the more stable and reliable application would be developed. All the analysis I have
done for this project is described in this chapter.
Chapter 6: Design
This is the stage where I have listed down my system functionalities. What I have to do now is
to design how customers will interact with my system and how system unit will perform their
functionalities. In this chapter I have used UML diagrams to model user requirements and
system functionalities. Furthermore, in this chapter I am going to write a brief paragraph about
data modelling and normalization. Also I will include database ER design then I am planning to
show database graph before and after normalization process.
Chapter 7: Implementation
This is the section in which I have discussed the architecture I adopted for the implementation.
I have also described how I have divided my code into layers, responsibility of each layer and
what I have included in each layer.
Chapter 8: Testing
Once the implementation phase is done, I will perform testing to locate errors which need to
remove before system goes live. In this section, I have described the testing techniques I have
used and the way I have done testing of the prototype developed.
Most of the airlines in the world are making use of IT to facilitate customization of client
trips and to better manage the airline operations. An online airline reservation system
comprises of other sub systems to perform a range of tasks from start to end of a journey.
Computer based passenger reservations systems provide accurate as well as timely information
concerning passenger number and flights involved (Jones 2004). This information is then used
as an input for the other systems to make strategic decisions by the airline management.
Through linking airlines, computerized flight reservation system can practically link almost all
airlines in addition to providing advantage of efficiency, reliability and labour cost reduction
(Jones 2004). Automation of flight reservation process allows airlines to simulate alterations in
flight schedules and also predict the effect of those alterations on the revenue base (Vidgen,
Avison, and Wood 2002). In the past applications have been developed using the distributed
systems technology but these apps were lacking adaptability in the business process changes
and reusability factor was also too low. The modern airline systems built on web technologies
offer centralized reusable services based on SOA (Service Oriented Architecture). These systems
dramatically enhance the system flexibility along with providing a mechanism for information
sharing with other systems. These services are achieved through development and
implementation of flight reservation web service (Lang, Wojtkowski and Wojtkowski 2008).
A typical flight reservation system asks information from the customers about origin,
destination, passengers, flight dates and travel document identity. Some of the vital details
include: name, gender, age, address, passport number, the type of plane the customer would
like to travel in and the customers destination point (Jones 2004). The most important part of
any reservation system is its search functionality in able to find out several direct and indirect
flight options for a client according to the given parameters. During the search phase,
additional information may also be presented to the customer such as the lowest fare on a
11
particular date, number of available seats at the point of search. System should also display the
unavailability of seats meeting the desired criteria but in a polite manner (Lang, Wojtkowski nd
Wojtkowski 2008). Cancellation of reserved seat and any permissible changes in the reservation
should also be part of reservation system. Flight reservation system should be efficient enough
to re-track the number of available seat as soon as a cancellation is made. The flight reservation
system should possess the capacity to print tickets with all the details such as flight details,
passenger data, the class, name of the plane, in addition to destination. Price list of various
tickets should also be included in the system (Vidgen, Avison, and Wood 2002). An adequate
search from a typical reservation system returns enough number of flights having different
price class to meet the needs of passengers according to their budget. Online reservation
system has the strong capability to reduce errors that might have occurred when using a
manual system of reservation. The online system makes it suitable for customers to book the
flights as when they require. Customers can therefore make use of this system to make
reservations, modify reservations in addition to cancel reservations. The flight reservation
system software should be specially developed so as to function as an independent application.
It should be established as a self-contained product (Milde 2008).
Flight reservation system should be capable of interacting with hardware and software
interfaces. Customers should be able to share the permissible data from the reservation
database in a predefined format and mechanism. As this system is meant to be used by a huge
group of audience having different levels of capabilities and exposure to the IT, system must be
easy to use, self explanatory and user friendly. It should guide the user properly both through
the regular process of reservation and any exceptional cases that may come across. Lang,
Wojtkowski and Wojtkowsk (2008), states that a local area network should be incorporated into
the system for communication between the various client systems that are used for flight
12
reservations. Flight reservation system should be able to handle the task to reserve a multi
flight trip for a customer on a particular date and time without any restrictions. Once the
reservation process is complete, system should be able to generate a reference number that
can be communicated to the customer in order for them to cancel or to make any changes to
the trip at a later stage. Some of the vital details available to the customers through the use of
provided reference number are origin, destination, and flight data and time, and passenger
details. The system should allow for modification or cancellation of reservations provided the
action meets the terms and conditions set at the time of reservation. (Lang, Wojtkowski and
Wojtkowsk 2008).
User interface of the flight reservation system should be clear and easy to understand.
User interface comprise of several screens that runs the user through different stages of the
reservation. Initial interface should have information about the airline, any discounts and offers
available at that time along with a section for flight search which allows for the users to select a
variety of options including viewing a flight and booking a ticket (Lang, Wojtkowski and
Wojtkowsk 2008). The other interface for flight reservation system is the window based view
which makes sure that all information concerning the customers choice is opened in a new
window. Multiple windows can be displayed on the screen and clients can switch between
them. System should be able to handle the validation and processing errors and should display
the proper error message to the customer as soon as the error occurs. The system should be
designed in such a way so as to support a variety of input and output devices including
keyboard and printers. System should be able to process, store and manage the information
entered by customer such as personal data and flight details. System response time should be
good enough to find the reliable travel option for the customer in shortest possible time (Milde
2008).
13
System should be able to present the flight and scheduling information to the user in a
friendly and easy to understand manner. It should be easy enough to be used by a layman to
for finding the different flight options available and then choosing one of them to reserve a
seat. The aspect that system should display all flights available along with their respective
destinations and cost, makes it easy for customers to book a ticket (Vidgen, Avison, and Wood
2002).
Reservation system deals with sensitive information and key processes of an airline.
Therefore security and stability are considered the most crucial aspects of any reservation
system and these should be designed to suit the modern nature of airline industry. It should
allow simultaneous access to the key functionalities for different users across various
geographical locations. The system, according to Lang, Wojtkowski and Wojtkowski (2008),
should have the ability to keep track of account and passenger bookings in a real time
environment, and provide instant updates of all transactions. An efficient airline reservation
system should offer modern and flexible experience to the end customers along with providing
useful input data to the other systems and sources used by an airline such as inventory, travel
agencies, call centre, interlining booking and many others. Interlining interface makes it easy
for airlines to receive bookings from, as well as make bookings on, other airlines through other
reservation systems (Vidgen, Avison, and Wood 2002).
It would be beneficial for the reservation system to offer other related additional
services such as hotel room booking, pick and drop service and car rental. System should also
be able to provide customization of the user trip by offering different services such as e-tickets,
provision for special meal requests, holiday tour plans booking and frequent flyer programs
(Jones 2004). It would be important that the system be able to calculate the rewards and points
for certain schemes offered by airline such as frequent flyer program. Thus a flight reservation
14
system would not only perform the primary task of reservation but also provide the airline
management a way to increase the efficiency of several other operations of the airline and
increase profitability. In this way, flight reservation system provides assistance to the airline
management for addressing back office, administrative, financial matters along with providing
solution to several problems typically faced by any airline such as airline load, scheduling,
overbooking, discounted seats and fine tuning the number of special fare seats in accordance
with number of reservations (Milde 2008). Due to the fact that a short interruption in the
system could cost an airline millions, airline reservation system should be designed to meet the
high standards of reliability in order to reduce the failure rate to bare minimum.
The complex mechanism of air fares, flight schedules and availability of seats has moved
directly to the consumers from the hand of trained travel agents over the past few years. A
common man usually makes buying decision using incomplete information because he is
usually armed with little more than a set of internet query forms and a comparison chart for
airfare prices. (Doganis, R, 2006)
On average, a consumer consults with 4 air travel sites for price quotes before making a
purchase. These quote charts enable us to cross compare the airfare but do not tell us if the
price is reasonable based on history and real time pricing factors. Although it is disheartening to
find out that the person sitting next to you on a flight has paid much less than what you have
paid, but it is extremely hard to determine the exact impact of airfare deciding factors.
However in our research earlier, we have tried to make a set of deciding factors that are quite
eminent. We will now discuss them in detail and try to find out how these can attribute
towards the final cost of a trip.
15
During our early research, we have chosen following pricing factors from a list of many complex
inter related direct and indirect attributes that cause the air fare change dramatically.
Although it is too hard to determine how exactly each of these factors may affect the airfare.
We will be discussing these factors with the help of historical and real data publicly available to
us.
We have seen a sharp price hike as well as other charges imposed by all airlines during the year
2007-2008 when oil prices were at the all time high. Following chart shows the average jet fuel
price from year 2000 to 2008. We can see that oil prices have gone up by 216% on average.
16
Figure2.2:Airline Fuel Cost and Consumption (U.S. Carriers - Scheduled) (Fare Compare, 2010)
17
During the year 2007-2008, there were many measures taken by almost every airline to curb
the high cost of fuel. These measures include rising the airfare and adding different surcharges
to the base fare. Following statistics from year 2007-2008 shows the impact of fuel price in
various parts of the world:
Round-trip domestic fares were increased by $20 by: American Airlines, Continental
Airlines, Northwest Airlines, United Airlines, US Airways, Delta Airlines.
AirTran increased round-trip prices by $10 on last minute tickets (within 7 days of
travel). $20 round-trip fare increases for longer flights.
In India, airlines are reported to have increased airfares by Rs150 per flight
(approximately $3.80 USD) to reflect the higher cost of oil.
In the UK, airlines are looking at increasing airfare costs as well, largely because they
budgeted costs for 2008 based on early 2007 fuel costs, when crude oil was still around
$75 a barrel.
Figure2.3:Fourth Quarter Average Domestic Fares from Year-to-Year (Fare Compare, 2010)
18
1.1.2 Session
Season for the flight ticket purchase and flight time also matters. However there is no definite
rule about this for the airlines. Every airline may follow its own timings to reflect the seasonal
change in the airfare and it could be different for different routes as well. In general season
Christmas and Easter is referred by off-season however history data shows that October and
November are also inexpensive. It has also been observed that few airlines do not give any
weigh to the season.
19
Date
8-Dec
9-Dec
10-Dec
11-Dec
12-Dec
13-Dec
14-Dec
15-Dec
16-Dec
17-Dec
18-Dec
19-Dec
20-Dec
21-Dec
22-Dec
23-Dec
24-Dec
25-Dec
26-Dec
27-Dec
28-Dec
29-Dec
30-Dec
31-Dec
Day
Thu
Fri
Sat
Sun
Mon
Tue
Wed
Thu
Fri
Sat
Sun
Mon
Tue
Wed
Thu
Fri
Sat
Sun
Mon
Tue
Wed
Thu
Fri
Reading- Reading1
2
8 Dec
9 Dec
Date
1-Jan
53.99
2-Jan
63.99
78.99
3-Jan
73.99
78.99
4-Jan
83.99
83.99
5-Jan
53.99
63.99
6-Jan
37.99
37.99
7-Jan
37.99
37.99
8-Jan
37.99
37.99
9-Jan
42.99
43.99 10-Jan
57.99
63.99 11-Jan
65.99
65.99 12-Jan
43.99
41.99 13-Jan
4.00
4.00 14-Jan
40.99
38.99 15-Jan
51.99
50.99 16-Jan
63.99
65.99 17-Jan
NFA
NFA
18-Jan
65.99
65.99 19-Jan
55.99
55.99 20-Jan
55.99
55.99 21-Jan
55.99
53.99 22-Jan
63.99
62.99 23-Jan
65.99
65.99 24-Jan
25-Jan
Day
Sat
Sun
Mon
Tue
Wed
Thu
Fri
Sat
Sun
Mon
Tue
Wed
Thu
Fri
Sat
Sun
Mon
Tue
Wed
Thu
Fri
Sat
Sun
Mon
Tue
Reading- Reading1
2
8 Dec
9 Dec
40.99
41.99
83.99
87.99
43.99
40.99
28.99
27.99
25.99
26.99
25.99
26.99
28.99
28.99
26.99
26.99
26.99
26.99
26.99
26.99
25.99
25.99
25.99
25.99
26.99
26.99
30.99
31.99
25.99
26.99
26.99
26.99
25.99
25.99
26.99
26.99
25.99
25.99
25.99
25.99
30.99
30.99
25.99
26.99
25.99
25.99
25.99
25.99
25.99
25.99
I have done some statistical analysis of the data to determine the time of purchase factor for
our flight reservation system. These statistical analysis includes the calculation of percentage of
reduction in price of the flight based on how many weeks do we have before the actual flight
departure time and the time of the booking.
Below table shows the analysis data that is based on the actual price quote listed in the above
table spanning across six months time period. Weeks ahead column shows the number of
weeks we have between the time of the booking and the actual flight departure time. Average
price column shows the average price for the specific week based on the value in the weeks
ahead column. This average value is calculated based on the two readings for example 14 price
quotes for a single week. Any day less than a week distance away from the flight departure
20
time is considered in the zero weeks ahead category. Average for this week is considered as the
base price for our analysis.
Difference
with
Previous
Reduction Week
0.00%
33.69%
33.69%
39.31%
5.61%
18.15%
-21.16%
60.05%
41.90%
63.14%
3.09%
63.62%
0.48%
64.58%
0.96%
64.29%
-0.29%
64.39%
0.10%
63.91%
-0.48%
63.43%
-0.48%
64.68%
1.25%
64.49%
-0.19%
64.10%
-0.39%
63.23%
-0.87%
64.29%
1.06%
64.29%
0.00%
63.33%
-0.97%
64.49%
1.16%
60.43%
-4.05%
62.94%
2.51%
64.49%
1.54%
63.52%
-0.97%
57.15%
-6.37%
63.52%
6.37%
64.87%
1.35%
Reduction column shows weekly reduction in price in percentage. Last column of the table
above shows the percentage difference of current week as compared to the previous week.
With this analysis table we have drawn a graph like below.
21
22
weeks
ahead
Discount on base
price
0-Jan
1-Jan
2-Jan
3-Jan
4-Jan
5 or more
0
30%
35%
40%
50%
60%
23
61.99
65.99
62.49
26.99
26.49
25.99
27.99
25.99
25.99
27.49
25.99
Difference Avg of
%
Avgs
46.93%
60.98%
4.87%
-12.34%
25.11%
-3.29%
-4.41%
0.00%
-1.52%
-1.52%
4.17%
-4.41%
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
25.99
26.39
26.39
26.79
25.99
25.99
25.99
25.99
29.39
26.99
26.39
26.99
27.99
25.99
25.99
25.99
25.99
26.99
28.49
27.49
27.49
29.99
26.99
29.49
28.49
25.99
26.99
40.99
29.49
25.99
Net Avg
0.00%
-1.52%
2.27%
6.35%
5.77%
5.77%
15.39%
3.85%
0.34%
5.56%
-1.52%
0.00%
46.45%
13.47%
0.00%
7.37%
4.15%
Column labelled Avg Price Working day represents the average price for the current week for
working days only. Next column shows the price quote for the weekend for the current week.
Difference column shows the percentage of the difference between the average price of
weekdays and weekend flight for the same origin and destination. We can see that the price
over the weekend is generally higher than what we get during the working days. However there
are few exceptions like in week 3, where we can see a decline of 12% over the weekend flight
price. For our analysis in this project, we will take this as the exceptional case that might have
occurred due to some other factor involved.
For our project, we will take the average of averages method to determine the feasible value
for the day factor that we implement in the code. We will discuss it later after we have a look at
few related graphs. Let us have a look at the weekend vs. weekday price graph below. We can
see that weekday and weekend price vary by a narrow margin except in the start of the graph
where we have less time left before the actual flight time. After the 3 rd week ahead, we can see
a minimal difference between the flight price on different days. If we draw the trend line of the
weekdays price (black dotted line in the below graph), we can see that price tends to be higher
for first six weeks at any time and then price converges to a narrow fluctuation state. Similarly if
we draw a trend line for the weekend flight price(solid yellow line in the below chart), we can
see that the pattern of the trend is almost same as of the trend of the weekday flight price.
However the difference between the two is high for initial five weeks and then the line moves
on the curve close to the other trend line.
25
26
We can see that difference is very high for the first two weeks. Then it comes out to be negative
for a while before it starts moving in a narrow band above and below the reference line. If we
calculate the average of averages, we can see from the table at the start of this section that
average of the average prices for first four weeks comes out to be as high as 25% of the
weekday price. Similarly average for the remaining weeks of our six month time span, the
difference comes out to be just 4.15% of the weekday price quote. Therefore I will use the day
factor as per the below table in the implementation of the project.
Weeks
Ahead
0-4
4 or more
Difference
25%
4%
different airport on the same city (Morrell, P.S., 2007). Many major cities of the world have
more than one airport to cope with the high volume of travellers. The main airport of the city
usually charges congestion surcharges thus adding additional cost to the basic fare.
29
30
Chapter 3: Requirements
First of all, we would review the merits and demerits of each of the common research
techniques used and adopt the best one for going about this project. Project members need
requirement gathering techniques that they would apply on the stakeholders - the customers
who would be using this system in order to gather the required information. Several
information gathering techniques are commonly used for research purpose, such as interviews,
surveys, questionnaires, experiments, observation.
3.2 Survey
It is also known as the pencil and paper technique. It is the method of gathering information in
which written communication is used. Questions are written on a paper or an email and sent to
potential respondents. It can be open-ended, in which respondents can express their opinions
in their own words, or close-ended, in answer choices are already given and the respondent
needs to tick the best option. The survey method comprises of a questionnaire as the
instrument.
I have divided system requirements into two major stages, functional requirements and nonfunctional requirements.
3.4 Functional Requirements:
Customers can use the search engine in the system in order to find suitable flight for them.
They interact with the system by filling the search form in the main page. After Clicking search
flight button, the system will redirect the customer to the result page.
In the flight calendar, customers can view all available flights. They can select a flight by
checking the radio buttons in the flight calendar.
Both customers and admin can insert their personal details in the system.
In order to interact with the system, customers can add their information in the system.
Customers can make payment in order to book a flight. They can insert their card details and
confirm the payment. Also they receive the booking reference code after they make the payment
successfully.
When customers finish the booking process, they receive their ticket directly. Also they can
print the ticket.
32
Usability
The flight reservation system is used by wide range of people. The usability features
must be implemented in the system. To achieve the system goals and target, it
should be simple and usable by users. It should not contain any complexity.
The system will be developed in certain way that supports learnability and will be
easy to use and easy to navigate. Also the system will provide help and guide to
users.
Reliability
The system should be reliable this is essential as flight reservation system can be
accessed by thousands of people who search for a flight regularly. This is one of the
most important features of any system. The system should perform in stable level at
any time users interact with the system.
Performance
The system should perform in accurate and satisfied way. Also this type of system
should response quickly because it deals with huge process in short time.
Accessibility
Applying accessibility features will make the system available to wide range of
customers. Sometimes they access to the system using their mobile phones or
screen readers.
The flight reservation system should be designed in a simpler way. All system tools,
menus and navigation buttons should not be complex.
33
Chapter 4: Methodology
Methodology can be defined as a combination of process model and the technique that used.
To effectively develop and manage of a project we must have to adopt some kind of software
engineering methodology. For this project I have used prototype as a technique and RUP
(Rational Unified Process) as a model. I have chosen prototype as a development technique
because I want to see the output of the application while I progress in the implementing the
requirements. The application I have developed is the combination of different modules, some
of them are depended on each other and some of them are not. In this scenario prototype
technique is the most appropriate option left for me.
Rational Unified Process (RUP) is the model which perfectly matches with the design of my
project and it covers best practices of the modern software development. In RUP, responsibility
of each development area is clearly defined and well structured (Bergstrom, S. & Raberg, L.,
2004). This model covers almost all the attributes which I desired to accomplish before and
during the application development, which are
34
Chapter 5: Analysis
5.1 Domain Analysis
To learn project background information; domain analysis is the process which software
engineers apply (Lethbridge, T.C. and Laganiere, R., 2001).
Domain analysis gives developer an understanding about the problem domain and the actual
functionality which client requires. At this point developer also gets an understanding for whom
this system is developed and why this system is required. Following are the functionalities I
gathered after the domain analysis
When all the process is done then customer will be routed to the payment page
and he or she will perform payment of the fare calculated through the price
algorithm implemented in the system.
Once payment is done, system will mark the flight seats and show booking
confirmation.
35
For Admin:
36
Chapter 6: Design
In the previous chapter I have done domain analysis to get complete idea about the problem to
be solved. For the design phase, I will use object oriented designing and UML modelling
technique. Below I have mentioned the approach I followed.
It is easy to locate any type functionality, feature or anything within large system
which makes it highly maintainable.
Before I start designing the prototype model I have done a research on many similar systems
such as Fly BMI system and Easy Jet system.
37
Most of flight reservation systems have advanced search facilities which help
customers to search on a specific flight. The search engine is located on the main
page of the system which makes the site easy to use by customers.
Search results appear as a calendar that contains all available flight. This helps
customer to find their flights by days and times.
38
Registration is not required. Customers can view, search and book a flight
without need to be registered users.
Systems are designed in simple layout which makes the system usable by wide
range of people. This supports the usability and accessibility of the system.
As a result of this research I have implemented all the characteristics and the findings above in
the prototype model of the system.
Header
From:
Admin login
To:
Name:
Depart
Return
Password:
login
Flight class
Adult
Children
Infant
Get flight
39
Header
Select flight
Outbound flight
calendar
Inbound flight
calendar
Serch again
Next
40
Presentation Layer
Presentation layer of the prototype contains all the code related to its user interface.
AdminMaster is the master page which has content place holder which will act as a work area
for the application. All the other pages like Flights, Passengers, Payment etc. will be show
in the work area. Below I have mentioned class diagram for the presentation layer.
Data Layer
All the classes which will interact with the airline reservation database are included in this layer.
SQLHelper is the class which is responsible of establishing connection with the database and
executing queries after that. All the other classes will use SQLHelper class to perform their
CRUD procedures.
42
Business Layer
Business Layer of the application includes classes which connects presentation layer with the
data layer. Let me mention FlightManager class and all the other classes perform similar kind
of operations but with different responsibility. FlightManager class connects Flights page in
the presentation layer with the FlightBooking class in the data layer. All the database
operations are routed through FlightManager class and it also performs any type of business
rule validation and conversion required.
Print e-ticket.
44
6.4 ER Modelling
An entity-relationship model (ERM) is an abstract and conceptual representation of data. This
modelling technique is used to generate conceptual schema of the database. There are many
ERM tools that help generate the schema definition of several relational databases. This
modelling helps us during the requirements analysis phase to overview the information needed
by the system and type of information that needs to be stored in database.
ER diagrams consist of entities, relationships and associated attributes. An entity may be
defined as a thing which is recognized as being capable of an independent existence and which
can be uniquely identified. These entities are extracted from the domain of the project. An
entity may be a physical object, an event or even a concept that will turn into reality during
later stages of the project development. Entities are typically drawn as rectangles. An entity
may have several associated attributes that are drawn as oval and are connected by a line such
as in image below.
A relationship is drawn as a diamond with attributes drawn as oval connected by a line such as
in image below.
ER diagrams are made in three steps. First step to think is that what are the entities do we have
in the business domain and what are the relationships that exist between them. Second step is
to consider the attributes of the entities that we need to store in the database for the
operations of the application. Next step is to consider the integrity constraints or business rules
that hold true for the application. Relational constraint between different entities could be 1to-1, 1-to-many, Many-to-1 and Many-to-Many as shown below in the diagram.
45
Last step is to map the ER diagram into a relational schema. In the next section, we will present
the database diagram that has been generated as a result of the ER mapping to the relational
schema.
6.5 Normalization:
Organizing the data in database in an efficient manner is called normalization. Normalization
process ensures that we eliminate the redundant data (same data stored in more than one
table) and that only the related data is stored in a table. This way database consumes less
amount of space and its performance is improved.
Normal Forms
First Normal form or 1NF ensures that there are no duplicative columns in any table and the key
attributes are defined. That means all attributes in a table are dependent on the primary key of
the table.
Second Normal form or 2NF ensures that we meet the requirements for 1NF and there is not
any partial dependency in a table. This means there should not be any attribute in a table which
is dependent only on a part of primary key instead of the whole primary key.
To meet the Third Normal form or 3NF level, database must be in 2NF and it should contain no
transitive dependencies. There should not be any non-key attribute that is dependent on
another non-key attribute of the same table.
46
Here in our Flight database, we know that we need to apply normalization to well-structure our
relations and tables. Here we will try to normalize our database up to 3NF if required. After
doing some analysis on our database, we realize that there are two relations that need to be
normalized because they contain more than one real world concepts. These two tables are
flight_location and payment. Let us normalize them one by one.
In case of flight_location, we know that this relation have information about the flight city and
airport from which the flight will go. We also know that city and airport are two different real
world entities and they should be recorded separately. So for this reason, we make two new
tables City and Airport and we add relevant attributes to each of them from the flight_location
table. Now we just simply add the primary keys of both of these new tables to the
flight_location table as foreign keys. Now we have successfully separated both real world
concepts and our logical design is same.
In case of payment, we know that this relation have information about the payments. It will
record billing and card information also. We also know that bill and card are two different real
world entities and they should be recorded separately. So for this reason, we make two new
47
tables Bill and Card and we add relevant attributes to each of them from the payment table.
Now we just simply add the primary keys of both of these new tables to the payment table as
foreign keys. Now we have successfully separated both real world concepts and our logical
design is same.
48
49
50
Chapter 7: Implementation
For the implementation I have adopt 3-tier architecture which is widely used by software
industry for the development of web applications. I have divided the code into three layers i.e.
data, business and presentation. When we talk about the layer then it is not more than a
module which includes the code which will be reused on multiple locations. In .Net terms each
layer is a separate project that represents specific functionality to achieve some goals.
7.1 Data Layer
Data is always the key part of any application and the responsibility of this layer is to get or set
any database field. My code will never bypass this layer while interacting with the database.
Any correspondence with the database would be done using this layer code. Let me discuss one
of the classes I have implemented in this layer. Rest of the classes follows the same type of
structure but with different responsibility.
This method will access the database and get flight information
Query :
select
51
This method will access the database and get flight price information
Query :
select
In the below mentioned code I have accessed the business object and fetched the data which I
need to show on the page
if (Session["SearchData"] != null)
{
srchData = (SearchData)Session["SearchData"];
52
Calendar2.VisibleDate = srchData.Depart;
if (!srchData.IsOneWayOnly)
{
InboundPanel.Visible = true;
inboundCalendar.VisibleDate = srchData.Return;
}
}
if (!IsPostBack)
{
FlightsBL FlghtBL = new FlightsBL();
outBoundFlightsList = FlghtBL.getFlights(srchData.From, srchData.To);
ViewState["outBoundFlightsList"] = outBoundFlightsList;
53
In the below mentioned code I have accessed the data layer object and fetched the data which
presentation layer requires.
Code:
54
55
Chapter 8: Testing
Testing is defined as being narrowly confined to testing the program code which is a process of
locating and fixing errors. This is the procedure which we perform once the application or any
module of application is developed. It totally depends on the project manager when he wants
to trigger this process. The current software development methodologies suggest that this
process should be attached with all of the development phases to catch errors in the early
stage of project.
Lethbridge, T.C. et al (2001) quoted two important points in his book for doing testing
effectively and efficiently.
To test effectively, you must use a strategy that uncovers as many defects as possible and to
test efficiently, you must find the largest number of possible defects using the fewest number
of tests (Lethbridge, T.C. et al, 2001)
Check the module code for any kind of data, syntax and algorithm errors.
Check that code and confirm that it fulfils all the requirements determined in the
start.
At the end create a test case and check that it is getting the required input and
producing the desired output.
56
57
The importance of web technologies is well known in various engineering fields. With the
growth in the requirement of web applications, advancement in these technologies was also
seen. People started demanding stable and advance functionalities for the web environment.
At this point software industry a lot of stable, mature and advice web development
technologies using which we can create a good quality web application. In the research phase I
have studied two of the most popular web development technologies and explored the way I
can use their facilities for the development of my project. ASP.NET and JSF are the two
technologies which offer same as well as some different set of features. Out of these two I have
selected ASP.NET because when it comes to the development of the small scale projects then
ASP.NET is easily maintainable, provide rich set of controls and libraries to allow rapid
application development. For the prototype development I have used many of the basic and
advance features of ASP.NET.
In order to achieve this task I have researched all the pricing factors that could affect flight
prices.
Task 2: Identify all the user, software and system requirements for the Airline
Reservation System.
My first task was to identify all the requirements of the prototype which I have to develop. To
achieve this task I have researched on different technologies which I could used for the
development, studied existing systems and explored the problems which customers face while
booking their tickets.
58
Task 3: To Use current software development process and model for the development
of the system
After I have analyzed the requirements and I have chosen Rational Unified Process (RUP) as a
process model and prototyping as a development technique. I have mentioned many reasons in
chapter three that why I have selected these methodologies for the development. This process
and model helped me a lot to control the project development and to avoid different obstacles
which I might face.
Task 4: Design and implement a website which will cover initial requirements of the
system.
I have mentioned all the design techniques and the approach I have followed for the prototype
development in chapter seven. I have also included the UML diagrams I made to model the
design of the prototype. I have tried my level best to follow the current software industry
standards with the timeframe of this project and I believe that I have achieved this objective up
to some extent.
59
The system has been designed in certain way that makes it visible by its
customers. All customers can interact with the system easily and they can
understand all its features. It shows feedback and informs customers
whenever they do something right or wrong. For example, if there is no
available flight the system shows message indicates that the search has not
found any result.
All commands, text and labels that are used in the system are commonly
used in the real world. Customers will easily understand how the system
works.
Error prevention:
The system was developed in simple way that prevents customers from
causing errors. For example if a customer has entered invalid date format, an
error massage appears to show the correct format.
60
The system has simple design and layout. All tools and buttons are necessary
for customers. The system does not contain unrequited information or
dialogs.
Help section was not implemented in the system. Creating this section might
help customers who need help and guide such as inexperienced users.
61
.NET is one of the proven software development technologies which now play a major role
when it comes to rapid application development. I have studied and used many .NET facilities in
my project. With comparison to java I think .NET provides more stable tools and facilities using
which you can develop a reliable web application quickly without hassle. After doing research
on the pricing systems and the factors which affects the flight pricing I found that there are
some problems which airlines could fix but some of the problems did not lie on their end. The
major problem which most of the customers might face is high fluctuation in the ticket pricing
and after study I found that airlines pricing systems are developed in such a way that it includes
many external factor while fare calculation. The factors which these systems consider are also
variable and fluctuates too much because of which we also see fluctuation in the airline pricing.
I have mentioned these factors in my literature review.
Achievements
By the end of this project I have achieved the entire core and advanced objectives of the
project. I have learnt basic and advanced skills of research, analysis and fundamentals of project
management.
Future Work
After successfully completion of dissertation I reached to the conclusion the following studies
and development required in this area.
I have not studied the .NET framework 4.0 facilities and how it can help me to improve
the system I have developed.
62
There are a lot of others complex variable pricing systems which currently airlines are
using. Due to limited timeframe I have not studied them but in future I will go through
those and improve pricing system of my application.
The functionalities which I have planned for the future are allowing user to:
Check-in online
Request for any type of transportation, hotel booking and price comparison with other
airlines.
63
Hexaware Technologies, n.d, Airlines and airports, viewed on September 4, 2010 from
http://www.hexaware.com/passenger.htm
Milde, M 2008, International Air Law and ICAO, ISBN 9077596542: Eleven International
Publishing
Vidgen, R Avison, D and Wood, B 2002, Developing Web information systems: from strategy to
implementation, ISBN 0750657634: Butterworth-Heinemann
Doganis, R. (2001). The airline business in the twenty-first century. NY: Routledge.
Morrison, S.A. & Winston, C. (1995). The Evolution of the Airline Industry. Washington: The
Brookings Institution.
Connor, W.E. (2001). An Introduction to Airline Economics, Sixth Edition. CT: Greenwood
Publishing.
Fare Compare.[Online] Available at: < www.farecompare.com > [Accessed 10 August 2010]
Centro, A. (2009). The Airline Industry: Challenges in the 21st Century. Frankfurt: Springer Ltd.
Rosenblatt, H.J. et al. (2007). System analysis and design. NY: Cengage Learning.
Lam, H.Q. & Thai, T.L. (2003). .NET framework essentials. USA: O'Reilly Media, Inc.
Ernst, C.G. (2004). Next Generation Airline Information: Using Consumer Devices to Keep
Passengers Informed and as an Additional Channel to Market In: 2004 IEEE International
64
Conference on Mobile Data Management. Kaifeng: IEEE Press, [Online] Portal, IEEE Digital
Library [Accessed on] 12 August 2010.
McFadden, F.R. et al. (2007). Modern Database Management. India: Pearson Education.
Hurwitz, D. & Liberty, J. (2006). Programming ASP.NET. USA: O'Reilly Media, Inc.
Bergstrom, S. & Raberg, L. (2004). Adopting the Rational Unified Process: Success with the
RUP. USA: Addison Wesley.
Nielsen, J. (1994b). Heuristic evaluation. In Nielsen, J., and Mack, L. Usability Inspection
Methods, John Wiley & Sons, New York, NY.
Flight Schedule.[Online] Available at: < www.kayak.com > [Accessed 11 August 2010]
Snasel, S. et al. (2009). Web site assessment in the airline industry: An empirical study of GCC
airline companies In: Applications of Digital Information and Web Technologies, 2009.
ICADIWT '09. Kaifeng: IEEE Press, pp. 193-198 [Online] Portal, IEEE Digital Library
[Accessed on] 12 August 2010.
E.F. Codd, "Normalized Data Base Structure: A Brief Tutorial", ACM SIGFIDET
Workshop on Data Description, Access, and Control, Nov. 11-12, 1971, San Diego,
California, E.F. Codd and A.L. Dean (eds.).
65
Appendix
1. Price data for London-Zurich flight
Date
8-Dec
9-Dec
10-Dec
11-Dec
12-Dec
13-Dec
14-Dec
15-Dec
16-Dec
17-Dec
18-Dec
19-Dec
20-Dec
21-Dec
22-Dec
23-Dec
24-Dec
25-Dec
26-Dec
27-Dec
28-Dec
29-Dec
30-Dec
31-Dec
Day
Thu
Fri
Sat
Sun
Mon
Tue
Wed
Thu
Fri
Sat
Sun
Mon
Tue
Wed
Thu
Fri
Sat
Sun
Mon
Tue
Wed
Thu
Fri
Reading1
8 Dec
Reading-2
9 Dec
Date
1-Jan
2-Jan
3-Jan
4-Jan
5-Jan
6-Jan
7-Jan
8-Jan
9-Jan
10-Jan
11-Jan
12-Jan
13-Jan
14-Jan
15-Jan
16-Jan
17-Jan
18-Jan
19-Jan
20-Jan
21-Jan
22-Jan
23-Jan
24-Jan
25-Jan
53.99
63.99
78.99
73.99
78.99
83.99
83.99
53.99
63.99
37.99
37.99
37.99
37.99
37.99
37.99
42.99
43.99
57.99
63.99
65.99
65.99
43.99
41.99
4.00
4.00
40.99
38.99
51.99
50.99
63.99
65.99
NFA*
NFA
65.99
65.99
55.99
55.99
55.99
55.99
55.99
53.99
63.99
62.99
65.99
65.99
Day
Sat
Sun
Mon
Tue
Wed
Thu
Fri
Sat
Sun
Mon
Tue
Wed
Thu
Fri
Sat
Sun
Mon
Tue
Wed
Thu
Fri
Sat
Sun
Mon
Tue
Reading- Reading1
2
8 Dec
9 Dec
40.99
41.99
83.99
87.99
43.99
40.99
28.99
27.99
25.99
26.99
25.99
26.99
28.99
28.99
26.99
26.99
26.99
26.99
26.99
26.99
25.99
25.99
25.99
25.99
26.99
26.99
30.99
31.99
25.99
26.99
26.99
26.99
25.99
25.99
26.99
26.99
25.99
25.99
25.99
25.99
30.99
30.99
25.99
26.99
25.99
25.99
25.99
25.99
25.99
25.99
Date
26-Jan
27-Jan
28-Jan
Day
Wed
Thu
Fri
Reading- Reading1
2
8 Dec
9 Dec
Date
25.99
25.99
20-Feb
25.99
25.99
21-Feb
35.99
36.99
22-Feb
66
Day
Sun
Mon
Tue
Reading- Reading1
2
8 Dec
9 Dec
28.99
28.99
25.99
25.99
25.99
25.99
29-Jan
30-Jan
31-Jan
1-Feb
2-Feb
3-Feb
4-Feb
5-Feb
6-Feb
7-Feb
8-Feb
9-Feb
10-Feb
11-Feb
12-Feb
13-Feb
14-Feb
15-Feb
16-Feb
17-Feb
18-Feb
19-Feb
Sat
Sun
Mon
Tue
Wed
Thu
Fri
Sat
Sun
Mon
Tue
Wed
Thu
Fri
Sat
Sun
Mon
Tue
Wed
Thu
Fri
Sat
28.99
26.99
25.99
25.99
25.99
26.99
26.99
25.99
25.99
25.99
25.99
25.99
25.99
27.99
25.99
25.99
25.99
25.99
25.99
25.99
27.99
25.99
30.00
26.99
25.99
25.99
25.99
26.99
28.99
25.99
25.99
25.99
25.99
25.99
25.99
28.99
25.99
25.99
25.99
25.99
25.99
25.99
27.99
25.99
23-Feb
24-Feb
25-Feb
26-Feb
27-Feb
28-Feb
1-Mar
2-Mar
3-Mar
4-Mar
5-Mar
6-Mar
7-Mar
8-Mar
9-Mar
10-Mar
11-Mar
12-Mar
13-Mar
14-Mar
15-Mar
16-Mar
67
Wed
Thu
Fri
Sat
Sun
Mon
Tue
Wed
Thu
Fri
Sat
Sun
Mon
Tue
Wed
Thu
Fri
Sat
Sun
Mon
Tue
Wed
25.99
25.99
31.99
25.99
25.99
25.99
25.99
25.99
25.99
25.99
25.99
25.99
25.99
25.99
25.99
25.99
27.99
25.99
25.99
25.99
25.99
25.99
25.99
25.99
32.99
27.99
25.99
25.99
25.99
25.99
25.99
27.99
25.99
25.99
25.99
25.99
25.99
25.99
27.99
25.99
25.99
25.99
25.99
25.99
Date
17-Mar
18-Mar
19-Mar
20-Mar
21-Mar
22-Mar
23-Mar
24-Mar
25-Mar
26-Mar
27-Mar
28-Mar
29-Mar
30-Mar
31-Mar
1-Apr
2-Apr
3-Apr
4-Apr
5-Apr
6-Apr
7-Apr
8-Apr
9-Apr
10-Apr
Day
Thu
Fri
Sat
Sun
Mon
Tue
Wed
Thu
Fri
Sat
Sun
Mon
Tue
Wed
Thu
Fri
Sat
Sun
Mon
Tue
Wed
Thu
Fri
Sat
Sun
Reading- Reading1
2
8 Dec
9 Dec
Date
25.99
25.99
11-Apr
27.99
27.99
12-Apr
27.99
27.99
13-Apr
25.99
25.99
14-Apr
27.99
27.99
15-Apr
25.99
25.99
16-Apr
25.99
25.99
17-Apr
25.99
25.99
18-Apr
27.99
27.99
19-Apr
27.99
27.99
20-Apr
28.99
27.99
21-Apr
25.99
25.99
22-Apr
25.99
25.99
23-Apr
25.99
25.99
24-Apr
25.99
25.99
25-Apr
25.99
25.99
26-Apr
25.99
25.99
27-Apr
28.99
28.99
28-Apr
25.99
25.99
29-Apr
25.99
25.99
30-Apr
25.99
25.99
1-May
25.99
25.99
2-May
25.99
25.99
3-May
25.99
25.99
4-May
28.99
28.99
5-May
68
Day
Mon
Tue
Wed
Thu
Fri
Sat
Sun
Mon
Tue
Wed
Thu
Fri
Sat
Sun
Mon
Tue
Wed
Thu
Fri
Sat
Sun
Mon
Tue
Wed
Thu
Reading- Reading1
2
8 Dec
9 Dec
25.99
25.99
25.99
25.99
25.99
25.99
25.99
25.99
25.99
25.99
28.99
28.99
30.99
30.99
25.99
25.99
25.99
25.99
25.99
25.99
25.99
25.99
25.99
25.99
25.99
25.99
27.99
27.99
28.99
28.99
25.99
25.99
25.99
25.99
27.99
25.99
37.99
37.99
32.99
32.99
25.99
25.99
25.99
25.99
25.99
25.99
25.99
25.99
25.99
25.99
Date
6-May
7-May
8-May
9-May
10-May
11-May
12-May
13-May
14-May
15-May
16-May
17-May
18-May
19-May
20-May
21-May
22-May
23-May
24-May
25-May
26-May
27-May
28-May
29-May
30-May
Day
Fri
Sat
Sun
Mon
Tue
Wed
Thu
Fri
Sat
Sun
Mon
Tue
Wed
Thu
Fri
Sat
Sun
Mon
Tue
Wed
Thu
Fri
Sat
Sun
Mon
Reading- Reading1
2
8 Dec
9 Dec
Date
30.99
30.99 31-May
25.99
25.99
1-Jun
30.99
30.99
2-Jun
25.99
25.99
3-Jun
25.99
25.99
4-Jun
25.99
25.99
5-Jun
25.99
25.99
6-Jun
27.99
27.99
7-Jun
25.99
25.99
8-Jun
25.99
25.99
9-Jun
28.99
28.99
10-Jun
25.99
25.99
11-Jun
25.99
25.99
12-Jun
25.99
25.99
27.99
27.99
25.99
25.99
27.99
27.99
25.99
25.99
25.99
25.99
25.99
25.99
25.99
25.99
35.99
35.99
43.99
43.99
37.99
37.99
25.99
25.99
Day
Tue
Wed
Thu
Fri
Sat
Sun
Mon
Tue
Wed
Thu
Fri
Sat
Sun
Reading- Reading1
2
8 Dec
9 Dec
25.99
25.99
25.99
25.99
25.99
25.99
25.99
25.99
25.99
25.99
32.99
32.99
25.99
25.99
25.99
25.99
25.99
25.99
25.99
25.99
25.99
25.99
25.99
25.99
25.99
25.99
Day
Fri
Sat
Sun
Mon
Tue
Wed
Thu
Fri
Sat
Date
Day
5-Jan Thu
Price
Date
68.99
18-Dec
58.99
19-Dec
228.99
20-Dec
72.99
21-Dec
38.99
22-Dec
38.99
23-Dec
38.99
24-Dec
68.99
25-Dec
78.99
26-Dec
Day
Sun
Mon
Tue
Wed
Thu
Fri
Sat
Sun
Mon
Price
Date
78.99
27-Dec
71.99
28-Dec
50.99
29-Dec
60.99
30-Dec
68.99
31-Dec
80.99
1-Jan
NFA
2-Jan
78.99
3-Jan
76.99
4-Jan
Price
Date
Day
25.99
16-Feb Thu
Day
Tue
Wed
Thu
Fri
Sat
Sun
Mon
Tue
Wed
Price
Date
Day
31.99 30-Mar Thu
69
Price
60.99
60.99
71.99
64.99
50.99
101.99
58.99
34.99
25.99
Price
25.99
6-Jan
7-Jan
8-Jan
9-Jan
10-Jan
11-Jan
12-Jan
13-Jan
14-Jan
15-Jan
16-Jan
17-Jan
18-Jan
19-Jan
20-Jan
21-Jan
22-Jan
23-Jan
24-Jan
25-Jan
26-Jan
27-Jan
28-Jan
29-Jan
30-Jan
31-Jan
1-Feb
2-Feb
3-Feb
4-Feb
5-Feb
6-Feb
7-Feb
8-Feb
9-Feb
10-Feb
11-Feb
12-Feb
13-Feb
14-Feb
15-Feb
Date
11-May
12-May
13-May
14-May
Fri
Sat
Sun
Mon
Tue
Wed
Thu
Fri
Sat
Sun
Mon
Tue
Wed
Thu
Fri
Sat
Sun
Mon
Tue
Wed
Thu
Fri
Sat
Sun
Mon
Tue
Wed
Thu
Fri
Sat
Sun
Mon
Tue
Wed
Thu
Fri
Sat
Sun
Mon
Tue
Wed
Day
Thu
Fri
Sat
Sun
26.99
31.99
50.99
26.99
26.99
26.99
26.99
26.99
28.99
30.99
25.99
26.99
26.99
25.99
26.99
26.99
26.99
25.99
26.99
26.99
31.99
32.99
26.99
26.99
25.99
25.99
26.99
26.99
31.99
26.99
26.99
25.99
25.99
25.99
25.99
25.99
36.99
27.99
26.99
25.99
25.99
Price
27.99
27.99
27.99
44.99
17-Feb
18-Feb
19-Feb
20-Feb
21-Feb
22-Feb
23-Feb
24-Feb
25-Feb
26-Feb
27-Feb
28-Feb
1-Mar
2-Mar
3-Mar
4-Mar
5-Mar
6-Mar
7-Mar
8-Mar
9-Mar
10-Mar
11-Mar
12-Mar
13-Mar
14-Mar
15-Mar
16-Mar
17-Mar
18-Mar
19-Mar
20-Mar
21-Mar
22-Mar
23-Mar
24-Mar
25-Mar
26-Mar
27-Mar
28-Mar
29-Mar
Fri
Sat
Sun
Mon
Tue
Wed
Thu
Fri
Sat
Sun
Mon
Tue
Wed
Thu
Fri
Sat
Sun
Mon
Tue
Wed
Thu
Fri
Sat
Sun
Mon
Tue
Wed
Thu
Fri
Sat
Sun
Mon
Tue
Wed
Thu
Fri
Sat
Sun
Mon
Tue
Wed
82.99
228.99
78.99
30.99
25.99
25.99
25.99
26.99
25.99
26.99
25.99
25.99
25.99
27.99
25.99
25.99
28.99
25.99
25.99
25.99
25.99
25.99
26.99
28.99
25.99
25.99
25.99
26.99
25.99
25.99
35.99
25.99
25.99
25.99
25.99
25.99
34.99
45.99
30.99
25.99
27.99
70
31-Mar
1-Apr
2-Apr
3-Apr
4-Apr
5-Apr
6-Apr
7-Apr
8-Apr
9-Apr
10-Apr
11-Apr
12-Apr
13-Apr
14-Apr
15-Apr
16-Apr
17-Apr
18-Apr
19-Apr
20-Apr
21-Apr
22-Apr
23-Apr
24-Apr
25-Apr
26-Apr
27-Apr
28-Apr
29-Apr
30-Apr
1-May
2-May
3-May
4-May
5-May
6-May
7-May
8-May
9-May
10-May
Fri
Sat
Sun
Mon
Tue
Wed
Thu
Fri
Sat
Sun
Mon
Tue
Wed
Thu
Fri
Sat
Sun
Mon
Tue
Wed
Thu
Fri
Sat
Sun
Mon
Tue
Wed
Thu
Fri
Sat
Sun
Mon
Tue
Wed
Thu
Fri
Sat
Sun
Mon
Tue
Wed
28.99
43.99
39.99
26.99
25.99
25.99
27.99
27.99
40.99
43.99
27.99
26.99
25.99
27.99
27.99
27.99
37.99
27.99
25.99
25.99
27.99
35.99
27.99
41.99
27.99
27.99
26.99
27.99
35.99
27.99
46.99
27.99
25.99
25.99
25.99
27.99
27.99
55.99
27.99
27.99
25.99
15-May
16-May
17-May
18-May
19-May
20-May
21-May
22-May
23-May
24-May
25-May
26-May
27-May
28-May
29-May
30-May
31-May
1-Jun
2-Jun
3-Jun
4-Jun
5-Jun
6-Jun
7-Jun
8-Jun
9-Jun
10-Jun
11-Jun
Mon
Tue
Wed
Thu
Fri
Sat
Sun
Mon
Tue
Wed
Thu
Fri
Sat
Sun
Mon
Tue
Wed
Thu
Fri
Sat
Sun
Mon
Tue
Wed
Thu
Fri
Sat
Sun
30.99
27.99
25.99
25.99
27.99
25.99
30.99
27.99
25.99
25.99
25.99
35.99
49.99
39.99
30.99
27.99
25.99
25.99
25.99
27.99
163.99
78.99
26.99
25.99
25.99
27.99
27.99
35.99
71
3. Questionnaire
1. How often you travel?
a. Frequently
b. Rarely
c. Never
5. Do you think airlines web site provides all the facilities customer requires?
a. Yes
b. No
c. Cant say
6. Do you think website which offers different airline services provides all the facilities customer
requires?
a. Yes
b. No
c. Cant say
72
10. Are you comfortable with the flight search methods which airlines provide?
a. Yes
b. No
c. Cant say
11. What do you think should be included to make flight search friendlier?
12. Are you comfortable with the flight reservation process which airlines provide?
a. Yes
b. No
c. Cant say
13. What do you think should be included to make flight reservation process more comfortable?
73
15. Do you think airline pricing system should be variable i.e. based on the external factors such as fuel
pricing, flight season etc?
a. Yes
b. No
c. Cant say
16. What do you think should be included to make airline pricing better?
17. What do you think airlines are charging extra for their flights?
18. Have you ever faced any type of system down issue?
a. Yes
b. No
c. Cant say
19. Did the airline provide any type of alternate solution while there system was down?
a. Yes
b. No
c. Cant say
74
22. Do you think airlines flight scheduling is up to the mark according to the customer requirements?
a. Yes
b. No
c. Cant say
23. If answer to Question 22 is No, then please provide the problem you faced while booking tickets?
a. Yes
b. No
c. Cant say
27. What do you suggest to improve the season offers and things which should be included?
___________ _____ ___ ____ _ __ __ __ __ ____ __ _____ ____ ___
___________ _____ ___ ____ _ __ __ __ __ ____ __ _____ ____ ___
76
Supervisor Name:
Dr Boekhorst, Rene te
Award Title:
Computer science
Student Signature:
77
Table of Contents
Index
Section
Page
Number
Introduction
Methodology
Functions
Objectives
Time plan
Hardware/Software Requirements
Bibliography
78
Introduction
Over the last years, the evolution of airline industry has shown a significant increase of
number of customers. This huge increment was the main reason of the severe demand
for developing automatic system which provides fast and easy service for those
customers. (Morrison & Winston, 1995)
Flight reservation is one of the first systems that we interact with in order to plan a trip.
Be it a leisure trip with flexible schedule or an emergency travel, reservation system
plays a vital role in facilitating the potential customers of an airline. It helps the airlines
by streamlining their process of reservation without human interaction thus enabling
them to perform well in the highly competitive market place. (Shaw, 2004)
The need of this system was realized since the early ages of air line industry when
information such as route, aircraft, schedule and fare about flight was published by
airlines in large books. Travel agents had the tough job to look into separate books for
reservations that involve multiple airlines. It was a dream to get a real time picture of
available seats because airlines share information at day end only. American Airline
was the first to build the computerized system to allow access to real time data to all its
offices. In 1964, Semi-Automated Business Research Environment (SABRE) was
developed with the help of IBM. (Desmond, 1989)
A typical flight reservation system provides functionalities such as flight schedule
information, seats availability, fare quote, reservation information, ticket information,
refunds and cancellation. Modern systems extend its services to provide features such
as hotel and car reservation in order to make the itinerary complete.
Pricing system is one of the most complex systems that people deal with. Each airline
has different pricing strategy and there are several factors might affect prices. For
example flight fares might change as a result of timing, seasons, availability,
competition and demand.
79
80
Function
System functionality is divided into two main scopes which are User Functionality and
Administrator Functionality.
-
User Functionality
Register
Login
Search for flight
Book flight
View booking details
Cancellation
Administrator Functionality
Login
View Flight
Add Flight
Edit / Delete Flight
View Reservations
Edit / Delete Reservation
81
Objectives
The project objectives should be set before the start of project because they provide a
guideline during the whole project and prevent researcher/developer to progress in
wrong direction. I have divided my project objectives into two parts; Core and Advance.
My core objectives are those which I must need to achieve to do this project
successfully and advance objectives are the ones which I will attempt based on the time
frame of this project.
82
Days
Requirement Analysis
Investigating and research the airlines pricing system
10
Literature Review
Software development processes and models
.NET technology standards and how it can help in developing web based
systems
.NET technology comparisons with other available technologies
How I can use .NET technologies for the development of Airline Reservation
System
Producing draft document
System Development
Implementation of Airline Reservation System
15
1
Critical analysis
Dissertation Report
Writing dissertation report using all the draft documents
10
1
64
Total
83
Hardware/Software Requirements
Following are the software requirements for the project
Microsoft Visual Studio 2008
SQL Server 2005
.NET framework 3.5
Windows XP SP2 (Including IIS)
Microsoft Office 2007 (Office/Visio/Project)
ASP.NET- C sharp
Photoshp CS3
84
Bibliography
Books
1. Bergstrom & Raberg (2004). Adopting the Rational Unified Process:
Success with the RUP. USA: Addison Wesley.
2. Sanderson (2009). Pro ASP.NET MVC Framework: Apress Series Expert's
voice in .NET. USA: Apress.
3. Shaw (2004). Airline Marketing and Management. 5th ed. England: Ashgate.
4. Morrison & Winston (1995). The evolution of the airline industry. US.
Washington: The Brookings Institution.
Articles
1.
85
5. Progress report 1
Supervisor: Boekhorst,
Date: 09/07/10
86
87
6. Progress report 2
Modular Masters Program in Computer Science
Project Modules - Progress Report 2
Name: Ahmed ALANAZI
Supervisor: Dr Rene
Date: 26/07/10
88
89
7. Progress report 3
Supervisor: Dr Rene
Date: 10/08/10
90
91
8. Progress report 4
Modular Masters Programme in Computer Science
Project Modules - Progress Report 4
Name: Ahmed ALANAZI
Supervisor: Dr Rene
Date: 24/08/10
92
93
9. Project code
Index.aspx
using
using
using
using
using
using
using
using
using
using
using
using
System;
System.Collections;
System.Configuration;
System.Data;
System.Linq;
System.Web;
System.Web.Security;
System.Web.UI;
System.Web.UI.WebControls;
System.Web.UI.WebControls.WebParts;
System.Web.UI.HtmlControls;
System.Xml.Linq;
using FRS.BusinessLayer;
namespace FRSWeb
{
public partial class index : System.Web.UI.Page
{
protected void btnGetFlights_Click(object sender, EventArgs e)
{
SearchData srchData = new SearchData();
srchData.From = ddlFrom.SelectedValue;
srchData.To = ddlTo.SelectedValue;
srchData.Depart =
DateTime.ParseExact(txtDepartDate.Text,"d/M/yyyy",null);
srchData.IsFixedDates = chkbFixedDates.Checked;
srchData.IsOneWayOnly = chkbOneWayOnly.Checked;
if(!srchData.IsOneWayOnly )
srchData.Return = DateTime.ParseExact(txtReturnDate.Text,
"d/M/yyyy", null);
else
srchData.Return = srchData.Depart;
srchData.FlightClass = ddlFlightClass.SelectedValue;
srchData.NoOfAdults = ddlNoOfAdults.SelectedValue;
srchData.NoOfChildren = ddlNoOfChildren.SelectedValue;
srchData.NoOfInfants = ddlNoOfInfants.SelectedValue;
srchData.NoOfPassengers =
Int32.Parse(ddlNoOfAdults.SelectedValue)
+
Int32.Parse(ddlNoOfChildren.SelectedValue)
+
Int32.Parse(ddlNoOfInfants.SelectedValue);
srchData.FromText = ddlFrom.SelectedItem.Text;
srchData.ToText = ddlTo.SelectedItem.Text;
srchData.FlightClassText = ddlFlightClass.SelectedItem.Text;
Session["SearchData"] = srchData;
Response.Redirect("Flights.aspx");
}
94
Flight.aspx
using
using
using
using
using
using
using
using
using
using
using
using
using
using
System;
System.Collections;
System.Configuration;
System.Data;
System.Linq;
System.Web;
System.Web.Security;
System.Web.UI;
System.Web.UI.WebControls;
System.Web.UI.WebControls.WebParts;
System.Web.UI.HtmlControls;
System.Xml.Linq;
System.Collections.Generic;
FRS.BusinessLayer;
namespace FRSWeb
{
public partial class Flights : System.Web.UI.Page
{
List<FlightsData> outBoundFlightsList ;
List<FlightsData> inBoundFlightsList;
List<FlightPricesData> flightPricesList;
SearchData srchData = null;
protected void Page_Load(object sender, EventArgs e)
{
if (Session["SearchData"] != null)
{
srchData = (SearchData)Session["SearchData"];
if (!srchData.IsOneWayOnly)
{
InboundPanel.Visible = true;
}
}
if (!IsPostBack)
{
FlightsBL FlghtBL = new FlightsBL();
outBoundFlightsList = FlghtBL.getFlights(srchData.From,
srchData.To);
ViewState["outBoundFlightsList"] = outBoundFlightsList;
Calendar2.VisibleDate = srchData.Depart;
95
96
97
switch (weekday)
{
case "1":
return DayOfWeek.Monday;
case "2":
return DayOfWeek.Tuesday;
case "3":
return DayOfWeek.Wednesday;
case "4":
return DayOfWeek.Thursday;
case "5":
return DayOfWeek.Friday;
case "6":
return DayOfWeek.Saturday;
case "7":
return DayOfWeek.Sunday;
}
return DayOfWeek.Sunday; //just to avoid compiler error. It wont
execute ever
}
protected void inboundCalendar_DayRender(object sender,
DayRenderEventArgs e)
{
CalendarDay cDay = e.Day;
TableCell tCell = e.Cell;
PricingManager pricingMngr = new PricingManager();
if (cDay.IsOtherMonth)
{
tCell.Text = String.Empty;
return;
}
if (cDay.Date <= DateTime.Now)
{
tCell.Text = String.Empty;
return;
}
if (inBoundFlightsList != null)
{
foreach (FlightsData fd in inBoundFlightsList)
{
if (cDay.Date >= fd.effectiveFrom
&& cDay.Date <= fd.effectiveTo
&& cDay.Date.DayOfWeek ==
ConvertToDayOfWeek(fd.weekday)
)
{
//dispay label
//caculate price
//store price and display it.
Label blanklbl = new Label();
blanklbl.Text = "<br/>";
tCell.Controls.Add(blanklbl);
Label lbl = new Label();
98
lbl.Text = fd.flightCode;
lbl.Font.Bold = true;
tCell.Controls.Add(lbl);
Label blanklbl2 = new Label();
blanklbl2.Text = "<br/>";
tCell.Controls.Add(blanklbl2);
Label pricelbl = new Label();
double flightPrice =
pricingMngr.getFlightPrice(flightPricesList, fd.flightID,
cDay.Date,
srchData.To, srchData.From);
pricelbl.Text = "" + flightPrice.ToString();
tCell.Controls.Add(pricelbl);
RadioButton rdBtn = new RadioButton();
rdBtn.GroupName = "INBOUNDFLIGHTS";
rdBtn.Attributes.Add("onclick", e.SelectUrl);
if (cDay.IsSelected)
{
rdBtn.Checked = true;
//update hidden value.
selectedInBoundFlight.Value = fd.flightID + "," +
cDay.Date.ToString()
+ "," +
pricelbl.Text;
Session["SelectedInBoundFlightID"] = fd.flightID;
Session["SelectedInBoundFlightDate"] = cDay.Date;
Session["SelectedInBoundFlightPrice"] =
flightPrice;
fd.FlightDate = cDay.Date;
Session["SelectedFlightsDataInBound"] = fd;
lblInBoundFlightError.Visible = false;
}
tCell.Controls.Add(rdBtn);
break;
}
}
}
else
{
//hide calendar and display message about no flights
//hide next button and ask user to hit prev button
lblInBoundFlightError.Text = "No flights available, please
search again";
lblInBoundFlightError.Visible = true;
}
}
protected void btnNext_Click(object sender, EventArgs e)
{
if (selectedOutBoundFlight.Value == String.Empty)
{
//plz select outbound flight
99
Passengers.aspx
using
using
using
using
using
using
using
using
using
using
using
using
System;
System.Collections;
System.Configuration;
System.Data;
System.Linq;
System.Web;
System.Web.Security;
System.Web.UI;
System.Web.UI.WebControls;
System.Web.UI.WebControls.WebParts;
System.Web.UI.HtmlControls;
System.Xml.Linq;
using FRS.BusinessLayer;
namespace FRSWeb
{
public partial class Passengers : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
SearchData srchData=null;
if (Session["SearchData"] != null)
{
srchData = (SearchData)Session["SearchData"];
}
if (srchData != null)
{
//generate controls for adult passengers
for (int i = 2; i <= Int32.Parse(srchData.NoOfAdults); i++)
{//start loop with 2 as we already have placed one control on
main page for first adult
100
Control passengerInfoUserControl =
LoadControl("PassengerInfo.ascx");
((Label)passengerInfoUserControl.FindControl("passengerInfoHeaderLbl")).Text
= Digit_In_Words(i) + " Adult";
passengerInfoUserControl.ID = "PassengerInfo" + "A" +
i.ToString(); //A=Adult, C=Child, I=Infant
PlaceHolder1.Controls.Add(passengerInfoUserControl);
}
//generate controls for child passengers
for (int i = 1; i <= Int32.Parse(srchData.NoOfChildren); i++)
{
Control passengerInfoUserControl =
LoadControl("PassengerInfo.ascx");
((Label)passengerInfoUserControl.FindControl("passengerInfoHeaderLbl")).Text
= Digit_In_Words(i) + " Child";
passengerInfoUserControl.ID = "PassengerInfo" + "C" +
i.ToString();
PlaceHolder1.Controls.Add(passengerInfoUserControl);
}
//generate controls for infant passengers
for (int i = 1; i <= Int32.Parse(srchData.NoOfInfants); i++)
{
Control passengerInfoUserControl =
LoadControl("PassengerInfo.ascx");
((Label)passengerInfoUserControl.FindControl("passengerInfoHeaderLbl")).Text
= Digit_In_Words(i) + " Infant";
passengerInfoUserControl.ID = "PassengerInfo" + "I" +
i.ToString();
PlaceHolder1.Controls.Add(passengerInfoUserControl);
}
}
}
private string Digit_In_Words(int i)
{
switch (i)
{
case 1:
return "First";
case 2:
return "Second";
case 3:
return "Third";
case 4:
return "Fourth";
case 5:
return "Fifth";
case 6:
return "Sixth";
case 7:
return "Seventh";
case 8:
return "Eigth";
case 9:
return "Ninth";
case 10:
101
return "Tenth";
}
return String.Empty;
}
protected void btnChooseFlight_Click(object sender, EventArgs e)
{
Response.Redirect("Flights.aspx");
}
protected void btnNext_Click(object sender, EventArgs e)
{
PassengersBL psngrBL = new PassengersBL();
string PassengersNames = String.Empty;
psngrBL.AddPassenger(ucPassengerInfo1.Gender,
ucPassengerInfo1.Title, ucPassengerInfo1.FirstName
, ucPassengerInfo1.LastName,
ucPassengerInfo1.Dob, ucPassengerInfo1.PhoneNo
, ucPassengerInfo1.CellNo,String.Empty);
PassengersNames += ucPassengerInfo1.LastName + ", "
+ ucPassengerInfo1.FirstName + " "
+ ucPassengerInfo1.Title;
for (int i = 0; i < PlaceHolder1.Controls.Count; i++)
{
PassengerInfo ucPsngerInfo =
(PassengerInfo)PlaceHolder1.Controls[i];
psngrBL.AddPassenger(ucPsngerInfo.Gender, ucPsngerInfo.Title,
ucPsngerInfo.FirstName,
ucPsngerInfo.LastName, ucPsngerInfo.Dob,
ucPsngerInfo.PhoneNo,
ucPsngerInfo.CellNo,String.Empty);
PassengersNames += "<br/>"+ucPsngerInfo.LastName + ", "
+ ucPsngerInfo.FirstName + " "
+ ucPsngerInfo.Title;
}
Session["psngrBL"] = psngrBL;
Session["PassengersNames"] = PassengersNames;
Response.Redirect("Payment.aspx");
}
}
}
Payment.aspx
using
using
using
using
System;
System.Collections;
System.Configuration;
System.Data;
102
using
using
using
using
using
using
using
using
System.Linq;
System.Web;
System.Web.Security;
System.Web.UI;
System.Web.UI.WebControls;
System.Web.UI.WebControls.WebParts;
System.Web.UI.HtmlControls;
System.Xml.Linq;
using FRS.BusinessLayer;
namespace FRSWeb
{
public partial class Payment : System.Web.UI.Page
{
PaymentBL myPymentBL;
double totalFare;
protected void Page_Load(object sender, EventArgs e)
{
totalFare = (double)Session["totalFare"];
lblPaymentAmount.Text = totalFare.ToString();
}
protected void btnMakeBooking_Click(object sender, EventArgs e)
{
/*<Begin transaction>
* 1-make payment entry and get the payment id
2- generate booking reference no
3- make entry into flight_booking table
4- make entry into flight passengers
* <end transaction>
5- Show e-ticket page.*/
#region Get Session Data
SearchData srchData = (SearchData)Session["SearchData"];
string outBoundFlightID =
(string)Session["SelectedOutBoundFlightID"];
DateTime outBoundFlightDate =
(DateTime)Session["SelectedOutBoundFlightDate"];
double outBoundFlightPrice =
(double)Session["SelectedOutBoundFlightPrice"];
string inBoundFlightID=string.Empty ;
DateTime inBoundFlightDate;
double inBoundFlightPrice;
#endregion
bool operationSuccess = false;
try
{
myPymentBL = new PaymentBL();
beginTransaction();
// 1-make payment entry and get the payment id
int paymentID = MakePayment();
//2- generate booking reference no
string bookRef = BookingManager.generateBoookingReference();
Session["MyBookingRef"] = bookRef;
//3-a insert outbound flight booking
103
myPymentBL.InsertFlightBooking(outBoundFlightID,
outBoundFlightDate, srchData.FlightClass
, bookRef,
srchData.NoOfPassengers, paymentID);
//3-b if applicable, insert inbound flight booking
if (!srchData.IsOneWayOnly)
{
inBoundFlightID =
(string)Session["SelectedInBoundFlightID"];
inBoundFlightDate =
(DateTime)Session["SelectedInBoundFlightDate"];
inBoundFlightPrice =
(double)Session["SelectedInBoundFlightPrice"];
myPymentBL.InsertFlightBooking(inBoundFlightID,
inBoundFlightDate, srchData.FlightClass
, bookRef,
srchData.NoOfPassengers, paymentID);
}
//4- make entry into passengers & flight passengers
//get passengers that user had entered on last screen
PassengersBL myPassengerBL =
(PassengersBL)Session["psngrBL"];
myPymentBL.InsertFlightPassengers(outBoundFlightID,
srchData.IsOneWayOnly, inBoundFlightID
, bookRef, myPassengerBL);
commitTransaction();
operationSuccess = true;
}
catch (Exception ex)
{
string errMsg = ex.Message;
rollBackTransaction();
}
finally
{
if(operationSuccess)
Response.Redirect("eTicket.aspx");
}
}
private void beginTransaction()
{
myPymentBL.beginTransaction();
}
private void commitTransaction()
{
myPymentBL.commitTransaction();
}
private void rollBackTransaction()
{
myPymentBL.rollBackTransaction();
}
104
FlightLocationMgmnt.aspx
using
using
using
using
using
using
using
using
using
using
using
using
System;
System.Collections;
System.Configuration;
System.Data;
System.Linq;
System.Web;
System.Web.Security;
System.Web.UI;
System.Web.UI.WebControls;
System.Web.UI.WebControls.WebParts;
System.Web.UI.HtmlControls;
System.Xml.Linq;
using FRS.BusinessLayer.Admin;
namespace FRSWeb.Admin
{
public partial class FlightLocationMgmnt : System.Web.UI.Page
{
FlightLocationMgmntBL flmBL = new FlightLocationMgmntBL();
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
FillFlightLocationsGrid();
}
private void FillFlightLocationsGrid()
{
DataTable dtFL= flmBL.FetchAllRecords();
if (dtFL.Rows.Count > 0)
{
GridView1.DataSource = dtFL;
GridView1.DataBind();
}
else
{
dtFL.Rows.Add(dtFL.NewRow());
GridView1.DataSource = dtFL;
GridView1.DataBind();
105
106
FlightManagement.aspx
using
using
using
using
using
using
using
using
using
using
using
using
System;
System.Collections;
System.Configuration;
System.Data;
System.Linq;
System.Web;
System.Web.Security;
System.Web.UI;
System.Web.UI.WebControls;
System.Web.UI.WebControls.WebParts;
System.Web.UI.HtmlControls;
System.Xml.Linq;
namespace FRSWeb.Admin
{
107
FlightPriceMgmnt.aspx
using
using
using
using
using
using
using
using
using
using
using
using
System;
System.Collections;
System.Configuration;
System.Data;
System.Linq;
System.Web;
System.Web.Security;
System.Web.UI;
System.Web.UI.WebControls;
System.Web.UI.WebControls.WebParts;
System.Web.UI.HtmlControls;
System.Xml.Linq;
using FRS.BusinessLayer.Admin;
namespace FRSWeb.Admin
{
public partial class FlightPriceMgmnt : System.Web.UI.Page
{
int selectedFlightID;
protected void Page_Load(object sender, EventArgs e)
{
}
private void FillFlightPricesGrid()
{
DataTable dtFLPrices =
FlightPriceManager.FetchAllRecords(selectedFlightID);
if (dtFLPrices.Rows.Count > 0)
{
GridView1.DataSource = dtFLPrices;
GridView1.DataBind();
}
else
{
/*No data found. Add a blank row to display the message to
user*/
dtFLPrices.Rows.Add(dtFLPrices.NewRow());
GridView1.DataSource = dtFLPrices;
GridView1.DataBind();
int TotalColumns = GridView1.Rows[0].Cells.Count;
GridView1.Rows[0].Cells.Clear();
GridView1.Rows[0].Cells.Add(new TableCell());
GridView1.Rows[0].Cells[0].ColumnSpan = TotalColumns;
GridView1.Rows[0].Cells[0].Text = "Price is not recoreded yet
for the selected flight";
108
}
}
protected void GridView1_RowCancelingEdit(object sender,
GridViewCancelEditEventArgs e)
{
GridView1.EditIndex = -1;
selectedFlightID = Int32.Parse(ddlSelectFlight.SelectedValue);
FillFlightPricesGrid();
}
protected void GridView1_RowCommand(object sender,
GridViewCommandEventArgs e)
{
if (e.CommandName.Equals("AddNew"))
{
string strEffectiveFrom =
((TextBox)GridView1.FooterRow.FindControl("txtEffectiveFrom")).Text;
DateTime effectiveFrom =
DateTime.ParseExact(strEffectiveFrom, "dd/MM/yyyy", null);
double basePrice
=Double.Parse(((TextBox)GridView1.FooterRow.FindControl("txtBasePrice")).Text
);
double fuelprice =
Double.Parse(((TextBox)GridView1.FooterRow.FindControl("txtFuel")).Text);
double localEvent
=Double.Parse(((TextBox)GridView1.FooterRow.FindControl("txtLocalEvent")).Tex
t);
double competitorAdjustment =
Double.Parse(((TextBox)GridView1.FooterRow.FindControl("txtCompetitorAdjustme
nt")).Text);
double loadAdjustment
=Double.Parse(((TextBox)GridView1.FooterRow.FindControl("txtLoadAdjustment"))
.Text);
double misc =
Double.Parse(((TextBox)GridView1.FooterRow.FindControl("txtMisc")).Text);
selectedFlightID =
Int32.Parse(ddlSelectFlight.SelectedValue);
FlightPriceManager flghtPriceMngr = new
FlightPriceManager(selectedFlightID,effectiveFrom
,basePrice, fuelprice, localEvent, competitorAdjustment,
loadAdjustment,misc);
flghtPriceMngr.Insert();
showFooter.Value = "N";
FillFlightPricesGrid();
}
else if (e.CommandName.Equals("CancelAddNew"))
{
showFooter.Value = "N";
selectedFlightID =
Int32.Parse(ddlSelectFlight.SelectedValue);
FillFlightPricesGrid();
}
}
protected void GridView1_RowDeleting(object sender,
GridViewDeleteEventArgs e)
{
109
FlightPriceManager.Delete(Int32.Parse(ddlSelectFlight.SelectedValue),
DateTime.Parse(GridView1.DataKeys[e.RowIndex].Value.ToString()));
selectedFlightID = Int32.Parse(ddlSelectFlight.SelectedValue);
FillFlightPricesGrid();
}
protected void GridView1_RowEditing(object sender,
GridViewEditEventArgs e)
{
GridView1.EditIndex = e.NewEditIndex;
selectedFlightID = Int32.Parse(ddlSelectFlight.SelectedValue);
FillFlightPricesGrid();
}
protected void GridView1_RowUpdating(object sender,
GridViewUpdateEventArgs e)
{
string strEffectiveFrom =
((TextBox)GridView1.Rows[e.RowIndex].FindControl("txtEffectiveFrom")).Text;
DateTime effectiveFrom = DateTime.Parse(strEffectiveFrom);
double basePrice =
Double.Parse(((TextBox)GridView1.Rows[e.RowIndex].FindControl("txtBasePrice")
).Text);
double fuelprice =
Double.Parse(((TextBox)GridView1.Rows[e.RowIndex].FindControl("txtFuel")).Tex
t);
double localEvent =
Double.Parse(((TextBox)GridView1.Rows[e.RowIndex].FindControl("txtLocalEvent"
)).Text);
double competitorAdjustment =
Double.Parse(((TextBox)GridView1.Rows[e.RowIndex].FindControl("txtCompetitorA
djustment")).Text);
double loadAdjustment =
Double.Parse(((TextBox)GridView1.Rows[e.RowIndex].FindControl("txtLoadAdjustm
ent")).Text);
double misc =
Double.Parse(((TextBox)GridView1.Rows[e.RowIndex].FindControl("txtMisc")).Tex
t);
selectedFlightID = Int32.Parse(ddlSelectFlight.SelectedValue);
FlightPriceManager flghtPriceMngr = new
FlightPriceManager(selectedFlightID, effectiveFrom
, basePrice, fuelprice, localEvent, competitorAdjustment,
loadAdjustment, misc);
flghtPriceMngr.Update(DateTime.Parse(GridView1.DataKeys[e.RowIndex].Value.ToS
tring()));
GridView1.EditIndex = -1;
FillFlightPricesGrid();
}
protected void GridView1_RowDataBound(object sender,
GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.Footer)
{
if (showFooter.Value == "N")
110
e.Row.Visible = false;
}
}
protected void btnAddNew_Click(object sender, EventArgs e)
{
showFooter.Value = "Y";
selectedFlightID = Int32.Parse(ddlSelectFlight.SelectedValue);
FillFlightPricesGrid();
}
protected void ddlSelectFlight_SelectedIndexChanged(object sender,
EventArgs e)
{
selectedFlightID = Int32.Parse(ddlSelectFlight.SelectedValue);
FillFlightPricesGrid();
}
protected void ddlSelectFlight_DataBound(object sender, EventArgs e)
{
selectedFlightID = Int32.Parse(ddlSelectFlight.SelectedValue);
FillFlightPricesGrid();
}
}
}
BookingManager.cs
using
using
using
using
System;
System.Collections.Generic;
System.Linq;
System.Text;
using System.Security.Cryptography;
namespace FRS.BusinessLayer
{
public class BookingManager
{
public static string generateBoookingReference()
{
/*This code has been taken from following loation and then
modified according to my needs.
//code courtesy: http://ramanisandeep.wordpress.com/tag/generateunique-string-and-numbers-in-c/
*/
int maxSize = 6;
char[] chars = new char[62];
string a =
"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890";
chars = a.ToCharArray();
byte[] data = new byte[1];
RNGCryptoServiceProvider crypto = new
RNGCryptoServiceProvider();
crypto.GetNonZeroBytes(data) ;
data = new byte[maxSize];
crypto.GetNonZeroBytes(data);
111
FlightsBL.cs
using
using
using
using
using
using
System;
System.Collections.Generic;
System.Linq;
System.Text;
System.Data;
FRS.DataLayer;
namespace FRS.BusinessLayer
{
public class FlightsBL
{
public List<FlightsData> getFlights(string origin, string
destination)
{
FlightsDL flghtDL = new FlightsDL();
DataTable flightsDT = flghtDL.getFlights(origin, destination);
if (flightsDT.Rows.Count > 0)
{
List<FlightsData> flightsLst = new List<FlightsData>();
for (int i = 0; i < flightsDT.Rows.Count; i++)
{
FlightsData flightDataRecord = new FlightsData();
//initialize the obbject before we insert into list
flightDataRecord.flightID =
flightsDT.Rows[i]["flight_id"].ToString();
flightDataRecord.flightCode =
flightsDT.Rows[i]["flightCode"].ToString();
flightDataRecord.weekday =
flightsDT.Rows[i]["weekday"].ToString();
flightDataRecord.effectiveFrom =
DateTime.Parse(flightsDT.Rows[i]["effective_from"].ToString());
flightDataRecord.effectiveTo =
DateTime.Parse(flightsDT.Rows[i]["effective_to"].ToString());
flightDataRecord.flightDuration =
DateTime.Parse(flightsDT.Rows[i]["Flight_Duration"].ToString());
flightDataRecord.flightMilleage =
flightsDT.Rows[i]["flightMilleage"].ToString();
flightDataRecord.departTime =
DateTime.Parse(flightsDT.Rows[i]["departTime"].ToString()); ;
flightDataRecord.arrivalTime =
DateTime.Parse(flightsDT.Rows[i]["arrivalTime"].ToString()); ;
flightsLst.Add(flightDataRecord);
112
}
return flightsLst;
}
else
return null;
}
public List<FlightPricesData> getFlightPrices(string origin, string
destination)
{
FlightsDL flghtDL = new FlightsDL();
DataTable flightPricesDT = flghtDL.getFlightPrices(origin,
destination);
if (flightPricesDT.Rows.Count > 0)
{
List<FlightPricesData> flightPricesLst = new
List<FlightPricesData>();
for (int i = 0; i < flightPricesDT.Rows.Count; i++)
{
FlightPricesData flightPriceRecord = new
FlightPricesData();
//initialize the obbject before we insert into list
flightPriceRecord.flight_id =
flightPricesDT.Rows[i]["flight_id"].ToString();
flightPriceRecord.FixedPrice = Double.Parse(
flightPricesDT.Rows[i]["FixedPrice"].ToString());
flightPriceRecord.effective_from =
DateTime.Parse(flightPricesDT.Rows[i]["effective_from"].ToString());
flightPriceRecord.effective_to =
DateTime.Parse(flightPricesDT.Rows[i]["effective_to"].ToString());
flightPricesLst.Add(flightPriceRecord);
}
return flightPricesLst;
}
else
return null;
}
}
}
PaymentBL.cs
using
using
using
using
System;
System.Collections.Generic;
System.Linq;
System.Text;
using FRS.DataLayer.Objects;
using FRS.DataLayer;
namespace FRS.BusinessLayer
{
public class PaymentBL
{
SqlHelper paymentSQLHelper;
113
public PaymentBL()
{
paymentSQLHelper = new SqlHelper();
}
public void beginTransaction()
{
paymentSQLHelper.beginTransaction();
}
public void commitTransaction()
{
paymentSQLHelper.commitTransaction();
}
public void rollBackTransaction()
{
paymentSQLHelper.rollBackTransaction();
}
public int MakePayment(string BillingAddressLine1,string
BillingAddressLine2
,string BillingAddressLine3,string BillingAddressLine4,string
BillingCountryCode
,string CardHolderName,string CardNumber,int CardType,int
ExpiryMonth,string ExpiryYear
,string SecurityCode, double paymentAmount)
{
Payment newPayment = new Payment();
newPayment.BillingAddressLine1 = BillingAddressLine1;
newPayment.BillingAddressLine2=BillingAddressLine2;
newPayment.BillingAddressLine3=BillingAddressLine3;
newPayment.BillingAddressLine4=BillingAddressLine4;
newPayment.BillingCountryCode=BillingCountryCode;
newPayment.CardHolderName=CardHolderName;
newPayment.CardNumber=CardNumber ;
newPayment.CardType=CardType;
newPayment.ExpiryMonth=ExpiryMonth;
newPayment.ExpiryYear=ExpiryYear;
newPayment.SecurityCode=SecurityCode;
newPayment.PaymentAmount = paymentAmount;
return newPayment.Insert(paymentSQLHelper);
}
public void InsertFlightBooking(string flghtID, DateTime flghtDt,
string cabnCls, string bookref, int noOfPsngr,
int pymntID)
{
FlightBooking myFlightBooking = new FlightBooking(flghtID,
flghtDt, cabnCls, bookref, noOfPsngr,
pymntID);
myFlightBooking.insert(paymentSQLHelper);
}
public void InsertFlightPassengers(string outBndFlightID, bool
isOneWay, string inBndFlightID,
string bookingRef, PassengersBL
myPassengersBl)
{
for (int i = 0; i < myPassengersBl.NoOfPassengers; i++)
114
{
PassengerInfo passenger = myPassengersBl.PassengersList[i];
int passengerID = passenger.Insert(paymentSQLHelper);
FlightPassengers flghtPassenger = new
FlightPassengers(outBndFlightID,bookingRef,passengerID);
flghtPassenger.Insert(this.paymentSQLHelper);
if (!isOneWay)
{
FlightPassengers flghtPassenger1 = new
FlightPassengers(inBndFlightID, bookingRef, passengerID);
flghtPassenger1.Insert(this.paymentSQLHelper);
}
}
}
}
}
PricingManager.cs
using
using
using
using
System;
System.Collections.Generic;
System.Linq;
System.Text;
namespace FRS.BusinessLayer
{
public class PricingManager
{
/*This class will be used to implement the pricing factors
that are further to what we already have in database.
For instance if company policy is to give 10% disc if the ticket it
being purchased
more than one month earlier than the flight time.*/
public double getFlightPrice(List<FlightPricesData> pricesList,
string flightID, DateTime flightDate, string origin, string dest, string
flightClass)
{
double priceQuote = 0.0;
foreach (FlightPricesData fpd in pricesList)
{
if (fpd.flight_id == flightID
&& flightDate >= fpd.effective_from
&& flightDate <= fpd.effective_to
)
{
/*This is the flight that is applicable out of the
list.*/
//get the fixed price first
priceQuote = fpd.FixedPrice;
/*Add the discount according to our findings through
analysis
Chart constructed in terms of weeks ahead (No of weeks
left in the flight date at the
* time of booking with a discount % on the base price
*Weeks ahead
Discount
115
*0
*1
*2
*3
*4
*5 or more
* */
0%
30%
35%
40%
50%
60%
FlightsDL.cs
using System;
using System.Data;
116
namespace FRS.DataLayer
{
public class FlightsDL
{
public DataTable getFlights(string origin, string dest)
{
string query = "select a.flight_id"
+ " ,a.flightCode"
+ " ,a.flightTime [Flight_Duration]"
+ " ,a.flightMilleage"
+ " ,b.weekday"
+ " ,b.departTime"
+ " ,b.arrivalTime"
+ " ,b.effective_from"
+ " ,isnull("
+ " (select
max(effective_from)"
+ " from flight_schedule"
+ " where flight_id =
b.flight_id"
+ " and
effective_from> b.effective_from"
+ " )"
+ " ,
dateadd(month,12,b.effective_from)"
+ " )as effective_to"
+ " from flight a"
+ " join flight_schedule b"
+ " on a.flight_id=b.flight_id"
+ " where a.flight_origin="+origin
+ " and a.flight_destination="+dest;
return SqlHelper.ExecuteDataTable(query);
}
public DataTable getFlightPrices(string origin, string dest)
{
string query = "select a.flight_id"
+ ",a.effective_from"
+ ",isnull("
+ "(select
max(effective_from)"
+ " from flight_price"
+ " where flight_id =
a.flight_id"
+ " and
effective_from> a.effective_from"
+ ")"
+ ",
dateadd(month,12,a.effective_from)"
+ ") as effective_to "
+ ",baseprice"
+ "+fuel"
+ "+localEvent"
+ "+competitorAdjustment"
+ "+loadAdjustment"
+ "+misc as FixedPrice"
+ " from flight_price a"
+ " where a.flight_id in ("
+ "select flight_id"
+ " from flight"
117
")"
" or"
"("
"
flight_origin="+dest
+ " and
flight_destination="+origin
+ ")"
+ ")";
return SqlHelper.ExecuteDataTable(query);
}
}
}
118