FinalProject Ahmed ALANAZI

118
 School of Computer Science MASTER OF SCIENCE I N (Computer Science) Project Report Flight Reservation System Author A.ALANAZI 07169574 Supervisor: Dr Boekhorst, Rene te Second Marker: Bennett, Steve Month and year of submission 01/2011

Transcript of FinalProject Ahmed ALANAZI

7/24/2019 FinalProject Ahmed ALANAZI

http://slidepdf.com/reader/full/finalproject-ahmed-alanazi 1/118

 

School of Computer Science

MASTER OF SCIENCE IN (Computer Science)

Project Report

Flight Reservation System

Author

A.ALANAZI07169574

Supervisor: Dr Boekhorst, Rene teSecond Marker: Bennett, Steve

Month and year of submission01/2011

7/24/2019 FinalProject Ahmed ALANAZI

http://slidepdf.com/reader/full/finalproject-ahmed-alanazi 2/1182

Table of content Abstract…...........................................................................................................................4

 Acknowledgement………………………………………........…………………………………5

Chapter 1: Introduction………………………………….......………………………………….6

1.1 Background to the Project……………………....…………………………………61.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………………………………..............……………………………282.1.8 Airport Congestion………………………...............……………………………28

2.1.9 Local Events………………………………................………………………….29

Chapter 3: Requir ements…………………………………...............………………………….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…............………………………………………………….…….355.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........................................................................................….............517.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

7/24/2019 FinalProject Ahmed ALANAZI

http://slidepdf.com/reader/full/finalproject-ahmed-alanazi 3/1183

Bibliography and References................................................................................…...........64

 Appendix ...........................................................................................................…..............66

Table of figures

index Figure page

1 Figure 2.1: Jet Fuel Price 17

2 Figure 2.2: Fuel Cost and Consumption 17

3 Figure 2.3: Fourth Quarter Average 18

4 Figure 2.4: Flight prices for 26 week ahead 22

5 Figure 2.5: Price reduction for the first 26 week ahead 23

6 Figure 2.6: Flight prices LHR - JFK 24

7 Figure 2.7: Weekends and weekdays prices and trends (London - Amsterdam)

26

8 Figure 2.8: Weekends and weekdays prices and trends(London-Zurich) 27

9 Figure 2.9: Weekends and weekdays prices percentage average prices 27

10 Figure 4.1: Process Structure of RUP 34

11 Figure 5.1: Admin use case 36

12 Figure 5.2: Customer use case 36

13 Figure 6.1: Fly BMI System 38

14 Figure 6.2: Easy Jet System 38

15 Figure 6.3: Main page layout 39

16 Figure 6.4: Select Flight page 40

17 Figure 6.5: Presentation Layer 41

18 Figure 6.6: Data Layer 42

19 Figure 6.7: Business Layer 43

20 Figure 6.8: Customer modelling behaviour 44

21 Figure 6.9 :Flight location new tables 47

22 Figure 6.10 :Payment new tables 48

23 Figure 6.11: Database diagram before normalization 49

24 Figure 6.12: Database diagram after normalization 50

7/24/2019 FinalProject Ahmed ALANAZI

http://slidepdf.com/reader/full/finalproject-ahmed-alanazi 4/1184

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.

7/24/2019 FinalProject Ahmed ALANAZI

http://slidepdf.com/reader/full/finalproject-ahmed-alanazi 5/1185

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.

7/24/2019 FinalProject Ahmed ALANAZI

http://slidepdf.com/reader/full/finalproject-ahmed-alanazi 6/1186

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

  Research on air lines pricing factors.

In this phase a research had been done on the factors involved in calculating fare of a

ticket such as fuel price, flight schedule, season etc.

  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.

1.2 Project 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

7/24/2019 FinalProject Ahmed ALANAZI

http://slidepdf.com/reader/full/finalproject-ahmed-alanazi 7/1187

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. 

  Investigate the pricing factors in airlines industry.

  Identify all the user, software and system requirements for the Airline Reservation

System.

  To understand web technologies.

  To explore .NET technology standards that can help in developing 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.

  To effectively plan, control and achieve project objectives.

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

  Allowing customers to confirm tickets by doing payment for their trips.

  Allowing customers to get ticket electronically (e-ticket).

  Giving customers seasonal and other discount offers.

  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

7/24/2019 FinalProject Ahmed ALANAZI

http://slidepdf.com/reader/full/finalproject-ahmed-alanazi 8/1188

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: L iteratur e 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 3: Requirement Gathering

Requirement gathering is a process which comes in the beginning of the project. In this chapter

I have discussed the techniques I have adopted for data and requirement gathering. With that I

have also developed a questioner from which I will get initial idea about the customer problems

which they face while booking their tickets. Using that information I will try to bring the

common functionalities which user wants in a system and avoid those which makes system

complex for the customers.

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.

7/24/2019 FinalProject Ahmed ALANAZI

http://slidepdf.com/reader/full/finalproject-ahmed-alanazi 9/1189

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.

Chapter 9: Cr iti cal Appraisal

In this section I have discussed the objectives I defined in the start and how I have achieved

those while moving forward in the project.

Chapter 10: Conclusion

In conclusion I have provided reader the overall conclusion of this project. I have mentioned my

achievements and the future work required which I concluded after doing whole research and

development for this project. 

7/24/2019 FinalProject Ahmed ALANAZI

http://slidepdf.com/reader/full/finalproject-ahmed-alanazi 10/11810

Chapter 2: Literature review and background research

By convergence of the world into a global village, travelling several thousand miles has

become so common for not only business but also for pleasure purposes. Due to the fast paced

nature of the world today, air travel is considered as one of the first choice among several

modes of travels to save time. Modern air travel industry has advanced to a level, where fleets

and services are shared among the system of systems being run by independent vendors or

service providers. This has resulted in tough competition among the airlines in the world to

attract more and more passengers by offering discounts in conjunction with a great deal of

luxuries to the clients. Keeping in mind the fact that people might not have enough time out of

their busy routine to go and visit a travel agent in order to make a reservation, most airlines

have offered their services over the World Wide Web. By having all companies their flights and

fleets data available to the end users over the web, it is now possible for the third party web

agent websites to make use of services and data shared by different airlines and replicate the

role of a travel agent sitting in the market. There are also several third parties web agents who

facilitate the reservation with an airline for a particular trip. Therefore internet has become the

integral part of the flight reservation not only for travel agents, who sitting in the office make

use of web servers of different airlines to find out the most suitable flight for a particular

customer, but also for the customers who want to reserve flight online without necessarily

having to contact air travel agents (Jones 2004). There are several phases for a particular air

travel; however reservation and check-in are the most important points of attachment between

customers and the airlines. The efficiency of the process of booking results in better customer

experience (Hexaware Technologies n.d).

7/24/2019 FinalProject Ahmed ALANAZI

http://slidepdf.com/reader/full/finalproject-ahmed-alanazi 11/11811

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

7/24/2019 FinalProject Ahmed ALANAZI

http://slidepdf.com/reader/full/finalproject-ahmed-alanazi 12/11812

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

7/24/2019 FinalProject Ahmed ALANAZI

http://slidepdf.com/reader/full/finalproject-ahmed-alanazi 13/11813

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 customer’s 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).

7/24/2019 FinalProject Ahmed ALANAZI

http://slidepdf.com/reader/full/finalproject-ahmed-alanazi 14/11814

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

7/24/2019 FinalProject Ahmed ALANAZI

http://slidepdf.com/reader/full/finalproject-ahmed-alanazi 15/11815

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.

2.1 Pricing Factors

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.

7/24/2019 FinalProject Ahmed ALANAZI

http://slidepdf.com/reader/full/finalproject-ahmed-alanazi 16/11816

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.

1.  Jet fuel price

2.  Season

3.  Time of flight

4.  Time of purchase

5.  Day of flight

6.  Route popularity

7.  Plane loads

8.  Airport Congestion

9.  Local events

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.

1.1.1   Jet Fuel

Jet Fuel is no doubt the major expense of any airline. A plane like B747 does around 10,000

kilos per hour which approximately covers 550 to 650 miles. We can imagine from this that how

much will be overall cost of the fuel for one one-way trip. Jet fuel is the major factor in pricing

of the ticket.

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.

7/24/2019 FinalProject Ahmed ALANAZI

http://slidepdf.com/reader/full/finalproject-ahmed-alanazi 17/11817

Figure: 2.1: (Jet Fuel Price, 2010)

:

This price hike has drastically increased the per gallon cost of the airlines as shown in the below

graph. We can see that despite the minimal change in the domestic and international fuel

consumption, there is huge difference in the cost that ranges from $0.8 to above $4.

Figure2.2:Airline Fuel Cost and Consumption (U.S. Carriers - Scheduled) (Fare Compare, 2010)

7/24/2019 FinalProject Ahmed ALANAZI

http://slidepdf.com/reader/full/finalproject-ahmed-alanazi 18/11818

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.” 

(Fare Compare, 2010)

Following table shows that average domestic airfare for the 4th quarter 2007 had an increase

by 4% over the same quarter in 2006.

Figure2.3:Fourth Quarter Average Domestic Fares from Year-to-Year (Fare Compare, 2010)

7/24/2019 FinalProject Ahmed ALANAZI

http://slidepdf.com/reader/full/finalproject-ahmed-alanazi 19/11819

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.

1.1.3   Time of F light

Day and time of flight can cause a major change in the airfare. On a typical route, a flight over

the weekend may cause up to more than $100 as compared to the similar flight during the

weekdays. According to FareCompare, “Saturday, Tuesday and Wednesday, typically early

morning, are the cheapest days and times to fly. Up to a $30 surcharge has been observed on

some of the most popular travel days to fly, including Spring Break, Memorial Day and

Christmas.” (Fare Compare, 2010) 

1.1.4   Time of Pur chase

On a similar pattern, time of purchase also does matters. It is a common rule followed by

travellers all across the globe to purchase the ticket well in advance to get the best deal.

However, according to research, common wisdom of buying tickets farther in advance usually

does not save money. The lowest price tends to hit between eight and two weeks before

departure. (Morrell, P.S., 2007)

I have done extensive research on the time of purchase factor. For this purpose we have

gathered real time price quote from EasyJet website for its flights from London to Amsterdam

and from London to Zurich. Below table shows the price quote for the economy class journey

from London to Amsterdam. I have gathered this data for six months of time period.

7/24/2019 FinalProject Ahmed ALANAZI

http://slidepdf.com/reader/full/finalproject-ahmed-alanazi 20/11820

Date Day

Reading-

1

8 Dec

Reading-

2

9 Dec Date Day

Reading-

1

8 Dec

Reading-

2

9 Dec

8-Dec 1-Jan Sat 40.99 41.99

9-Dec Thu £53.99 2-Jan Sun £83.99 87.99

10-Dec Fri £63.99 £78.99 3-Jan Mon £43.99 £40.99

11-Dec Sat £73.99 £78.99 4-Jan Tue £28.99 £27.9912-Dec Sun £83.99 £83.99 5-Jan Wed £25.99 £26.99

13-Dec Mon £53.99 £63.99 6-Jan Thu £25.99 £26.99

14-Dec Tue £37.99 £37.99 7-Jan Fri £28.99 £28.99

15-Dec Wed £37.99 £37.99 8-Jan Sat £26.99 £26.99

16-Dec Thu £37.99 £37.99 9-Jan Sun £26.99 £26.99

17-Dec Fri £42.99 £43.99 10-Jan Mon £26.99 £26.99

18-Dec Sat £57.99 £63.99 11-Jan Tue £25.99 £25.99

19-Dec Sun £65.99 £65.99 12-Jan Wed £25.99 £25.99

20-Dec Mon £43.99 £41.99 13-Jan Thu £26.99 £26.99

21-Dec Tue £4.00 £4.00 14-Jan Fri £30.99 £31.9922-Dec Wed £40.99 £38.99 15-Jan Sat £25.99 £26.99

23-Dec Thu £51.99 £50.99 16-Jan Sun £26.99 £26.99

24-Dec Fri £63.99 £65.99 17-Jan Mon £25.99 £25.99

25-Dec Sat NFA NFA 18-Jan Tue £26.99 £26.99

26-Dec Sun £65.99 £65.99 19-Jan Wed £25.99 £25.99

27-Dec Mon £55.99 £55.99 20-Jan Thu £25.99 £25.99

28-Dec Tue £55.99 £55.99 21-Jan Fri £30.99 £30.99

29-Dec Wed £55.99 £53.99 22-Jan Sat £25.99 £26.99

30-Dec Thu £63.99 £62.99 23-Jan Sun £25.99 £25.99

31-Dec Fri £65.99 £65.99 24-Jan Mon £25.99 £25.99

25-Jan Tue £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

7/24/2019 FinalProject Ahmed ALANAZI

http://slidepdf.com/reader/full/finalproject-ahmed-alanazi 21/11821

time is considered in the zero weeks ahead category. Average for this week is considered as the

base price for our analysis.

Weeks

Ahead

Average

Price

Base

Price Reduction

Difference

withPrevious

Week

0 £73.99 £73.99 0.00%

1 £49.06 £73.99 33.69% 33.69%

2 £44.91 £73.99 39.31% 5.61%

3 £60.56 £73.99 18.15% -21.16%

4 £29.56 £73.99 60.05% 41.90%

5 £27.28 £73.99 63.14% 3.09%

6 £26.92 £73.99 63.62% 0.48%

7 £26.20 £73.99 64.58% 0.96%8 £26.42 £73.99 64.29% -0.29%

9 £26.35 £73.99 64.39% 0.10%

10 £26.70 £73.99 63.91% -0.48%

11 £27.06 £73.99 63.43% -0.48%

12 £26.13 £73.99 64.68% 1.25%

13 £26.28 £73.99 64.49% -0.19%

14 £26.56 £73.99 64.10% -0.39%

15 £27.20 £73.99 63.23% -0.87%

16 £26.42 £73.99 64.29% 1.06%

17 £26.42 £73.99 64.29% 0.00%18 £27.13 £73.99 63.33% -0.97%

19 £26.28 £73.99 64.49% 1.16%

20 £29.28 £73.99 60.43% -4.05%

21 £27.42 £73.99 62.94% 2.51%

22 £26.28 £73.99 64.49% 1.54%

23 £26.99 £73.99 63.52% -0.97%

24 £31.70 £73.99 57.15% -6.37%

25 £26.99 £73.99 63.52% 6.37%

26 £25.99 £73.99 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.

7/24/2019 FinalProject Ahmed ALANAZI

http://slidepdf.com/reader/full/finalproject-ahmed-alanazi 22/11822

Figure 2.4: Flight prices for 26 week ahead

With the help of above graph, we can see that price of a flight is high if the time of the booking

is near to the flight departure time. There is typically a sharp decline in flight price for the first

few weeks and then flight price converges to a linear line. This linear trend however shows a

slight fluctuation sometimes due to some other parameter such as a public holiday or a local

event.

Let us have a look at another graph below. This graph shows the price reduction in percentage

with reference to the base price of the flight.

7/24/2019 FinalProject Ahmed ALANAZI

http://slidepdf.com/reader/full/finalproject-ahmed-alanazi 23/11823

Figure 2.5: Price reduction for the first 26 week ahead

We can easily identify three trends across the graph line. These sections have been marked

with label A, B and C. Section labelled A shows the high reduction rate of 30%-60% for the first

four weeks for a particular flight. Section B shows that the price of the flight converges to

approx 40% of base price, when the flight booking time is more than four weeks ahead of flightdeparture time. Similarly section C shows that the linear trend of the flight price from fourth

week onward may have a slight fluctuation of up to 5% due to some other factors.

From this analysis, keeping the data error in mind, I have determined the following table to

reflect the flight prices with respect to the Date factor for example the no. of weeks ahead

before the actual flight time calculated at the time of booking.

weeks

ahead

Discount on base

price

0-Jan 0

1-Jan 30%

2-Jan 35%

3-Jan 40%

4-Jan 50%

5 or more 60%

7/24/2019 FinalProject Ahmed ALANAZI

http://slidepdf.com/reader/full/finalproject-ahmed-alanazi 24/11824

1.1.5  

Day of F light

Following tables shows air fare difference for a flight from London, Heathrow to New York, JFK

from July 2010 to September 2010.

Figure2.6: (Flight Schedules, 2010)

We can see that typically low price have been reported during the week days. Also note that

the average airfare for the flight whose departure time is far away from now is cheap. Similarly

a flight during the late night hours can be little cheaper than the same flight during the day

time.

Following table shows the average price for the flight from London to Amsterdam for working

days (Monday to Friday) and weekend (Saturday and Sunday). First column represents the

number of weeks we have before the actual flight departure time.

Weeks

Ahead

Avg Price Working

Day

Avg Price

Weekend

Difference

%

Avg of

Avgs

0 £42.19 £61.99 46.93%

1 £40.99 £65.99 60.98%

2 £59.59 £62.49 4.87%3 £30.79 £26.99 -12.34% 25.11%

4 £27.39 £26.49 -3.29%

5 £27.19 £25.99 -4.41%

6 £27.99 £27.99 0.00%

7 £26.39 £25.99 -1.52%

8 £26.39 £25.99 -1.52%

9 £26.39 £27.49 4.17%

10 £27.19 £25.99 -4.41%

7/24/2019 FinalProject Ahmed ALANAZI

http://slidepdf.com/reader/full/finalproject-ahmed-alanazi 25/11825

11 £25.99 £25.99 0.00%

12 £26.39 £25.99 -1.52%

13 £26.39 £26.99 2.27%

14 £26.79 £28.49 6.35%

15 £25.99 £27.49 5.77%

16 £25.99 £27.49 5.77%

17 £25.99 £29.99 15.39%18 £25.99 £26.99 3.85%

19 £29.39 £29.49 0.34%

20 £26.99 £28.49 5.56%

21 £26.39 £25.99 -1.52%

22 £26.99 £26.99 0.00%

23 £27.99 £40.99 46.45%

24 £25.99 £29.49 13.47%

25 £25.99 £25.99 0.00% 4.15%

Net Avg 7.37%

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 3rd 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.

7/24/2019 FinalProject Ahmed ALANAZI

http://slidepdf.com/reader/full/finalproject-ahmed-alanazi 26/11826

Figure 2.7: Weekends and weekdays prices and trends(London-Amsterdam)

The same trend of prices can be seen in the price comparison graph for flight from London to

Zurich. In the below graph, we can notice that the difference between the two lines is higher

than the previous graph.

7/24/2019 FinalProject Ahmed ALANAZI

http://slidepdf.com/reader/full/finalproject-ahmed-alanazi 27/11827

Figure 2.8: Weekends and weekdays prices and trends(London-Zurich)

This is because we have measured this on single reading values for this particular origin and

destination. We can also notice that the difference is very huge for the 9th week entry. This is

probably due to some other factor involved and will not be part of our research.

To determine the value of the factor that we will implement in our project, let us have a look at

another graph below showing price difference averages.

Figure 2.9: Weekends and weekdays prices percentage average prices

7/24/2019 FinalProject Ahmed ALANAZI

http://slidepdf.com/reader/full/finalproject-ahmed-alanazi 28/11828

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 Difference

0-4 25%

4 or more 4%

1.1.6   Route popular ity

Popularity of the route of the flight plays an important role in determining the flight fare. It has

been observed that on a popular route, fares do not fluctuate as much as on any other

destination. This is because of the fact that on these routes, flights are already running at the

lowest levels due to heavy competition. Even huge fuel price hike has impacted such flights to a

minimal level and airlines try to save on the costs by adopting other methods such as lowering

the baggage allowance. (Morrell, P.S., 2007)

1.1.7   Plane loads

Plane loads is a measure to determine the occupancy rate of the seats on flights. Flights with

high plane load enable the airlines to offer low fare. Generally speaking overall cost is divided

among more passengers than fewer.

1.1.8   Ai rpor t Congestion

Airport congestion also play vital role. A flight from one origin to a specific destination can be

cheaper if it lands on the airport with less flights load as compared to the same flight to the

7/24/2019 FinalProject Ahmed ALANAZI

http://slidepdf.com/reader/full/finalproject-ahmed-alanazi 29/11829

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.

1.1.9  

Local events

Many events that attract more traffic to a particular location may also impact the fares of the

flights destined to the same location if the event is occurring near the flight time. For example

many travellers were trying to reach South Africa to watch football world cup early this month.

Usually price for such destinations goes up as the demand is too high.

1.1.10  Pri cing Manager Class

This class is responsible for implementing the pricing factors for our system. Few parameters

are set across the data layer and then price is adjusted according to the factors we have

researched out such as date factor and the day of the week factor. Below is the code snippet

for the class code. 

namespace FRS.BusinessLayer{

public class PricingManager{

/*This class will be used to implement the pricing factorsthat are further to what we already have in database.

For instance if company policy is to give 10% disc if the ticket itbeing purchased

more than one month earlier than the flight time.*/

public double getFlightPrice(List<FlightPricesData> pricesList,string flightID, DateTime flightDate, string origin, string dest)

{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 firstpriceQuote = fpd.FixedPrice;

/*Add the discount according to our findings throughanalysis

7/24/2019 FinalProject Ahmed ALANAZI

http://slidepdf.com/reader/full/finalproject-ahmed-alanazi 30/11830

Chart constructed in terms of weeks ahead (No of weeksleft in the flight date at the

* time of booking with a discount % on the base price*Weeks ahead Discount*0 0%*1 30%*2 35%*3 40%*4 50%*5 or more 60%* */

TimeSpan ts = flightDate - DateTime.Now;

/*We will also do the day of the flight factor here*/if (isWeekEnd(flightDate)) //flight on a weekend{

if (ts.Days < 4 * 7 ) //less than 4 weeks or morepriceQuote *= 1.25; //25% increase

else if (ts.Days >= 4 * 7) //4 weeks or morepriceQuote *= 1.04;  //4% increase

}

if (ts.Days > 5* 7 ) //5 weeks or morepriceQuote *= 0.40;

else if (ts.Days > 4 * 7) //4 weeks or morepriceQuote *= 0.50;

else if (ts.Days > 3 * 7) //3 weeks or morepriceQuote *= 0.60;

else if (ts.Days > 2 * 7) //2 weeks or morepriceQuote *= 0.65;

else if (ts.Days > 1 * 7) //1 weeks or morepriceQuote *= 0.70;

//origin and dest specific discount if anyif (origin == "9" && dest == "11")

priceQuote -= 10.00; //further 10 discount for flightfrom 9 to 11

if (flightClass == "Business")priceQuote *= 1.5;

else if (flightClass == "First")priceQuote *= 2;

break;

}

}

return priceQuote;

}}

7/24/2019 FinalProject Ahmed ALANAZI

http://slidepdf.com/reader/full/finalproject-ahmed-alanazi 31/11831

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 needrequirement 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.1 Interview Technique

An interview is a real-time dialogue between two or more people. It is usually face to face or

telephonic. The interviewer asks the interviewee questions whose answers can draw out the

required information. The interviewer can further discuss a critical topic that would ultimately

unfold crucial points related to the project. A list of pre-prepared questions can be made to

cover all areas of significance. If the interviewer feels that a certain topic needs more

discussion, it can be done on the spot.

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.

3.3 User Questionnaire

A questionnaire can be defined as a number of questions that can be handed out by a

researcher to a number of people in order to gather information from respondents. I have

designed a questionnaire that can be use in future, see appendix 3.

7/24/2019 FinalProject Ahmed ALANAZI

http://slidepdf.com/reader/full/finalproject-ahmed-alanazi 32/11832

I have divided system requirements into two major stages, functional requirements and non-

functional requirements.

3.4 Functional Requirements:

  Supports searching for flights throw the system.

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.

  Customers can choose any ticket from flight calendar.

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.

  The system supports purchasing process.

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.

  Customers can print E-ticket.

When customers finish the booking process, they receive their ticket directly. Also they can

print the ticket.

7/24/2019 FinalProject Ahmed ALANAZI

http://slidepdf.com/reader/full/finalproject-ahmed-alanazi 33/11833

3.5 None Functional requirements:

  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.

7/24/2019 FinalProject Ahmed ALANAZI

http://slidepdf.com/reader/full/finalproject-ahmed-alanazi 34/11834

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

  Identification of risk factors in the start and continuously.

  Ensures that we map the exact customer requirements.

  Always focus on exact progress which is the executable software.

  Most of changes are identified and accommodated in the development phase.

  Architectural changes are also identified in early stage.

  Force to build system with components.

Figure 4.1: Process Structure of RUP (Kruchten, P., 2000)

7/24/2019 FinalProject Ahmed ALANAZI

http://slidepdf.com/reader/full/finalproject-ahmed-alanazi 35/11835

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

  Customer can search flights.

  Customer can select flight out the search performed.

  After fight selection, customer put required passenger information.

  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.

  System will also allow printing of e-tickets.

  Separate GUI will be provided to administrator to manage locations and flight

pricing.

5.2 Use Cases

Use case can describe how the system behaves. The person role that interacts with the system

called an actor. Here I have designed two use cases diagrams.

7/24/2019 FinalProject Ahmed ALANAZI

http://slidepdf.com/reader/full/finalproject-ahmed-alanazi 36/11836

For Admin:

Figure 5.1: Admin use case

As can be seen from the diagram, the admin can play two significant roles. He can manage

flights location by adding airline route. Also the system admin can manage flights prices.

For Customer:

Figure 5.2: Customer use case

Customers can do:

-  Search for flight

-  Choose particular flight

-  Insert passenger details

-  Make payment

-  Make booking

-  Print E- ticket

7/24/2019 FinalProject Ahmed ALANAZI

http://slidepdf.com/reader/full/finalproject-ahmed-alanazi 37/11837

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.

6.1 Prototype Modelling

Following are benefits which I gained from modelling the design of the application

  Graphical representation is always user friendly and easy to understand as

compared to text. This helps developer to easily grab the requirement and

transform it to the actual code.

  Visual model gives client a better understating of system information.

  Helps in managing large system

  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.

7/24/2019 FinalProject Ahmed ALANAZI

http://slidepdf.com/reader/full/finalproject-ahmed-alanazi 38/11838

Figure 6.1: Fly BMI System

Figure 6.2: Easy Jet System

I have found the following design features:

  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.

7/24/2019 FinalProject Ahmed ALANAZI

http://slidepdf.com/reader/full/finalproject-ahmed-alanazi 39/11839

  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. 

6.1.1 Main Page Layout

Header

From:

To:

Depart

Return

Flight class

Adult

Children

Infant

One way only

My dates are fixed

Admin login

Name:

Password:

Get flight

login

 

Figure 6.3: Main page layout

The main page contains the flight search engine which includes drop down lists, textboxes,

checkboxes and buttons to help customers to search for flights in system database. Also it

contains the main header of the system. In addition, the main page includes admin login tool

which enables the system administrator to login to the system.

7/24/2019 FinalProject Ahmed ALANAZI

http://slidepdf.com/reader/full/finalproject-ahmed-alanazi 40/11840

6.1.2 Select Flight Page

Header

Select flight

Outbound flight

calendar

Inbound flight

calendar

Serch again Next

 

Figure 6.4: Select Flight page

Select flight page shows results of the search that has been done by a customer. This page

displays all the available flights as a calendar. Customers must choose outbound flight and

inbound flight before they can book a flight.

6.2 Object Modelling

For the object modelling I have created class diagram which represents how the objects are

group together and associated with each other. Diagram also includes attributes and operations

for each class. Below I have mentioned the class diagram for the prototype developed. All the

diagrams are generated through visual studio after the complete development.

7/24/2019 FinalProject Ahmed ALANAZI

http://slidepdf.com/reader/full/finalproject-ahmed-alanazi 41/11841

Presentati on 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.

Figure 6.5: Presentation Layer 

7/24/2019 FinalProject Ahmed ALANAZI

http://slidepdf.com/reader/full/finalproject-ahmed-alanazi 42/11842

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. 

Figure 6.6: Data Layer

7/24/2019 FinalProject Ahmed ALANAZI

http://slidepdf.com/reader/full/finalproject-ahmed-alanazi 43/11843

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 inthe 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.

Figure 6.7: Business Layer

7/24/2019 FinalProject Ahmed ALANAZI

http://slidepdf.com/reader/full/finalproject-ahmed-alanazi 44/11844

6.3 Modelling behaviour of the prototype

Applications always build up for some purpose: to provide behaviour, or functionality, which

satisfies the requirement and needs of the customer or users (Britton, C. and Doake, J., 2000).

Below I have modelled the behaviour of the main scenario of application which is about making

flight reservation.

Below is the behaviour diagram which covers following scenarios

  Search for a flight.

  Select fight from the search result.

 Enter passenger information for ticket booking.

  Make payment for the tickets.

  Print e-ticket.

Figure 6.8: Customer modelling behaviour

7/24/2019 FinalProject Ahmed ALANAZI

http://slidepdf.com/reader/full/finalproject-ahmed-alanazi 45/11845

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 1-

to-1, 1-to-many, Many-to-1 and Many-to-Many as shown below in the diagram.

7/24/2019 FinalProject Ahmed ALANAZI

http://slidepdf.com/reader/full/finalproject-ahmed-alanazi 46/11846

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

Normalization process is to follow the guidelines of making database design efficient at

different levels. These levels are numbered from one thorough five. The lowest form of

normalization is called first normal form or 1NF and similarly the highest is called the fifth

normal form or 5NF. However one key rule to the normalization is that the normalization

guidelines are merely guidelines only. Sometimes, it might be necessary to keep a relation in

de-normalized form to better meet the business scenario.

First Normal form or 1NF ensures that there are no duplicative columns in any table and the keyattributes 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.

7/24/2019 FinalProject Ahmed ALANAZI

http://slidepdf.com/reader/full/finalproject-ahmed-alanazi 47/11847

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.

Figure 6.9 :Flight location new tables

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

7/24/2019 FinalProject Ahmed ALANAZI

http://slidepdf.com/reader/full/finalproject-ahmed-alanazi 48/11848

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.

Figure 6.10 :Payment new tables

7/24/2019 FinalProject Ahmed ALANAZI

http://slidepdf.com/reader/full/finalproject-ahmed-alanazi 49/11849

Database (ER Diagram) before normalization:

Figure 6.11: Database diagram before normalization

7/24/2019 FinalProject Ahmed ALANAZI

http://slidepdf.com/reader/full/finalproject-ahmed-alanazi 50/11850

Database (ER Diagram) after normalization:

Figure 6.12: Database diagram after normalization

7/24/2019 FinalProject Ahmed ALANAZI

http://slidepdf.com/reader/full/finalproject-ahmed-alanazi 51/11851

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.

Class Name:  FlightDL.cs

Method: getF li ghts(str ing origin, str ing dest)

This method will access the database and get flight information

Query :

select a.flight_id , a.flightCode , b.weekday, 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

7/24/2019 FinalProject Ahmed ALANAZI

http://slidepdf.com/reader/full/finalproject-ahmed-alanazi 52/11852

+ " and a.flight_destination=" + dest;

Method: getF li ghtPri ces(str ing origin, str ing dest)

This method will access the database and get flight price information

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"

+ " where " + "(flight_origin="+origin + " and flight_destination="+dest + ")" + " or"

+ "(" + " flight_origin="+dest + " and flight_destination="+origin + ")" + ")";

7.2 Presentation Layer

All the UI related forms and classes will be placed in this layer. This layer is important because it

interacts with the users. It contains all the interfaces, client side functionalities and validations.

This layer is also very important for the project because most of the times users don’t like

airlines websites because those are not much user friendly. This layer will request business

layer for any type of operation on the system data and will not call data layer directly.

Class Name:  Flights.aspx

Method:  Page_Load(object sender, EventArgs e)

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"];

7/24/2019 FinalProject Ahmed ALANAZI

http://slidepdf.com/reader/full/finalproject-ahmed-alanazi 53/11853

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;

if (InboundPanel.Visible && srchData!=null)

{

inBoundFlightsList = FlghtBL.getFlights(srchData.To, srchData.From);

ViewState["inBoundFlightsList"] = inBoundFlightsList;

}

flightPricesList = FlghtBL.getFlightPrices(srchData.From, srchData.To);

ViewState["flightPricesList"] = flightPricesList;

}

else

{

outBoundFlightsList = (List<FlightsData>) ViewState["outBoundFlightsList"];

if (InboundPanel.Visible)

inBoundFlightsList = (List<FlightsData>) ViewState["inBoundFlightsList"];

flightPricesList = (List<FlightPricesData>)ViewState["flightPricesList"];

}

7/24/2019 FinalProject Ahmed ALANAZI

http://slidepdf.com/reader/full/finalproject-ahmed-alanazi 54/11854

7.3 Business Layer

This is the layer which sits between the presentation and data layer. You cannot allow

presentation layer to talk directly to the data layer. The presentation layer will request business

layer for the data and business layer will perform all the business operation such as calculation

or any kind of business rules validations on that. Once all the business operations are

performed, it will fetch the required data using the data layer objects. After getting the data

from data layer it will again apply any kind of business logic if required and pass it to the

presentation layer.

Class Name:  FlightBL.cs

Method:  List<FlightsData> getFlights(string origin, string destination)

In the below mentioned code I have accessed the data layer object and fetched the data which

presentation layer requires.

Code:

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++)

{

7/24/2019 FinalProject Ahmed ALANAZI

http://slidepdf.com/reader/full/finalproject-ahmed-alanazi 55/11855

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());

flightsLst.Add(flightDataRecord);

}

return flightsLst;

}

7/24/2019 FinalProject Ahmed ALANAZI

http://slidepdf.com/reader/full/finalproject-ahmed-alanazi 56/11856

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)

I have done unit and system testing of the prototype I developed.

8.1 Unit Testing

“Unit testing focuses on the building blocks of the software system that is objects and

subsystems” (Pressman, R.S., 2001). To unit test a program I have followed following steps

  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.

  Remove any kind of remaining syntax errors after compilation of code.

  At the end create a test case and check that it is getting the required input and

producing the desired output.

7/24/2019 FinalProject Ahmed ALANAZI

http://slidepdf.com/reader/full/finalproject-ahmed-alanazi 57/11857

8.2 System Testing

System testing ensures that the complete system compiles with the functional and non-

functional requirements. In the system testing I have designed the test cases first and then

executed it to check that it is giving the desire output. System testing has different types such

as performance testing, installation testing, functional testing and many other. Along with the

unit testing I have also done installation and functional testing. In the functional testing I have

made sure that the requirements which I identified in analysis stage are totally mapped.

7/24/2019 FinalProject Ahmed ALANAZI

http://slidepdf.com/reader/full/finalproject-ahmed-alanazi 58/11858

Chapter 9: Critical Appraisal

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 alsoseen. 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 thenASP.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.

9.1 Evaluate Project against system Objectives:

In the start of the project I have set some basic and advanced objectives which represent what I

want to achieve from this project. In order to achieve project objectives, first I must complete

all project tasks successfully. Below I have mentioned how I have accomplished my tasks.

  Task 1: Investigate the pricing factors in airlines industry.

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.

7/24/2019 FinalProject Ahmed ALANAZI

http://slidepdf.com/reader/full/finalproject-ahmed-alanazi 59/11859

  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.

  Tasks 5 and 6: To effectively plan, control and achieve project objectives.

By completing all project tasks I was able to achieve project objectives.

7/24/2019 FinalProject Ahmed ALANAZI

http://slidepdf.com/reader/full/finalproject-ahmed-alanazi 60/11860

9.2 Heuristic Evaluation

In this section I am going to evaluate the system on the basis of Jacob Nielson’s Heuristic

Evaluation.

  Visibility of system status:

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.

  Match between system and the real world:

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.

  User control and freedom:

In many airlines reservation systems there are restrictions on user control

and freedom. They cannot move to a particular page before they confirm the

pervious page. For example customers only can access payment page if they

book a flight. My system also does the same process.

  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.

7/24/2019 FinalProject Ahmed ALANAZI

http://slidepdf.com/reader/full/finalproject-ahmed-alanazi 61/11861

  Recognition rather than recall

This system is not complicated system. Customers do not need to memorize

how they use the system. They can navigate through the system easily.

  Flexibility and efficiency of use 

The system is straightforward to operate. However, it could be better if the

system can be more flexible. For example, implementing keyboard shortcuts

might support the use of the system. Regular and advanced customers can

easily navigate throw system pages using their keyboard. 

  Aesthetic and minimalist design:

The system has simple design and layout. All tools and buttons are necessary

for customers. The system does not contain unrequited information ordialogs.

  Help and documentation: 

Help section was not implemented in the system. Creating this section might

help customers who need help and guide such as inexperienced users.

7/24/2019 FinalProject Ahmed ALANAZI

http://slidepdf.com/reader/full/finalproject-ahmed-alanazi 62/11862

Chapter 10: Conclusion

.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.

  Skills to write thesis effectively as previously it was unclear.

  Overall learned skills to become a professional software engineer.

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.

7/24/2019 FinalProject Ahmed ALANAZI

http://slidepdf.com/reader/full/finalproject-ahmed-alanazi 63/11863

  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

-  Confirmation E-mail and SMS reminder.

-  Linking between Google calendar and customers reservations.

-  Request for any type of transportation, hotel booking and price comparison with other

airlines.

7/24/2019 FinalProject Ahmed ALANAZI

http://slidepdf.com/reader/full/finalproject-ahmed-alanazi 64/11864

Bibliography and References

  Hexaware Technologies, n.d, Airlines and airports, viewed on September 4, 2010 from

http://www.hexaware.com/passenger.htm

  Jones, P 2004, Flight catering , 2nd

 edn, ISBN 0750662166: Butterworth-Heinemann,

  Lang, M Wojtkowski, G and Wojtkowski, W 2008, Information Systems Development:

Challenges in Practice, Theory and Education, ISBN 0387304037 

  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.

  Lethbridge, T.C. and Laganiere, R. (2001). Object-Oriented Software Engineering. Glasgow:

McGraw-Hill.

  Doganis, R. (2006). The airline business. NY: Routledge.

  Connor, W.E. (2001). An Introduction to Airline Economics, Sixth Edition. CT: Greenwood

Publishing.

  Britton, C. and Doake, J. (2000). Object-Oriented Systems Development: A Gentle Introduction.

Cambridge: McGraw-Hill.

  Morrell, P.S. (2007). Airline Finance. Hampshire: Ashgate Publishing Limited.

  Jet Fuel Price.[Online] Available at: <www.aviationfuelprices.net> [Accessed 10 August 2010]

  Fare Compare.[Online] Available at: < www.farecompare.com > [Accessed 10 August 2010]

  Centro, A. (2009). The Airline Industry: Challenges in the 21 st 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

7/24/2019 FinalProject Ahmed ALANAZI

http://slidepdf.com/reader/full/finalproject-ahmed-alanazi 65/11865

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.

  Bergsten, H. (2004). JavaServer faces. USA: O'Reilly Media, Inc.

  Kurniawan, B. (2004). JavaServer Faces programming. Glasgow: McGraw-Hill.

  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.

  Wooley, Jim. et al. (2008). LINQ in Action. USA: Manning.

  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.

  C.J. Date, An Introduction to Database Systems (third edition), Addison-Wesley, 1981. 

  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.). 

  Relational model for data base –  DEHENEFFE, HENNEBERT, et al. - 1974

7/24/2019 FinalProject Ahmed ALANAZI

http://slidepdf.com/reader/full/finalproject-ahmed-alanazi 66/11866

Appendix

1.  Price data for London-Zurich flight

Date Day

Reading-

1

8 Dec

Reading-2

9 Dec Date Day

Reading-

1

8 Dec

Reading-

2

9 Dec

8-Dec 1-Jan Sat 40.99 41.99

9-Dec Thu £53.99 2-Jan Sun £83.99 87.99

10-Dec Fri £63.99 £78.99 3-Jan Mon £43.99 £40.99

11-Dec Sat £73.99 £78.99 4-Jan Tue £28.99 £27.99

12-Dec Sun £83.99 £83.99 5-Jan Wed £25.99 £26.99

13-Dec Mon £53.99 £63.99 6-Jan Thu £25.99 £26.99

14-Dec Tue £37.99 £37.99 7-Jan Fri £28.99 £28.99

15-Dec Wed £37.99 £37.99 8-Jan Sat £26.99 £26.99

16-Dec Thu £37.99 £37.99 9-Jan Sun £26.99 £26.99

17-Dec Fri £42.99 £43.99 10-Jan Mon £26.99 £26.99

18-Dec Sat £57.99 £63.99 11-Jan Tue £25.99 £25.99

19-Dec Sun £65.99 £65.99 12-Jan Wed £25.99 £25.99

20-Dec Mon £43.99 £41.99 13-Jan Thu £26.99 £26.99

21-Dec Tue £4.00 £4.00 14-Jan Fri £30.99 £31.99

22-Dec Wed £40.99 £38.99 15-Jan Sat £25.99 £26.99

23-Dec Thu £51.99 £50.99 16-Jan Sun £26.99 £26.99

24-Dec Fri £63.99 £65.99 17-Jan Mon £25.99 £25.99

25-Dec Sat NFA* NFA 18-Jan Tue £26.99 £26.99

26-Dec Sun £65.99 £65.99 19-Jan Wed £25.99 £25.9927-Dec Mon £55.99 £55.99 20-Jan Thu £25.99 £25.99

28-Dec Tue £55.99 £55.99 21-Jan Fri £30.99 £30.99

29-Dec Wed £55.99 £53.99 22-Jan Sat £25.99 £26.99

30-Dec Thu £63.99 £62.99 23-Jan Sun £25.99 £25.99

31-Dec Fri £65.99 £65.99 24-Jan Mon £25.99 £25.99

25-Jan Tue £25.99 25.99

* NFA – No flight available.

Date Day

Reading-

1

8 Dec

Reading-

2

9 Dec Date Day

Reading-

1

8 Dec

Reading-

2

9 Dec

26-Jan Wed £25.99 £25.99 20-Feb Sun £28.99 £28.99

27-Jan Thu £25.99 £25.99 21-Feb Mon £25.99 £25.99

28-Jan Fri £35.99 £36.99 22-Feb Tue £25.99 £25.99

7/24/2019 FinalProject Ahmed ALANAZI

http://slidepdf.com/reader/full/finalproject-ahmed-alanazi 67/11867

29-Jan Sat £28.99 £30.00 23-Feb Wed £25.99 £25.99

30-Jan Sun £26.99 £26.99 24-Feb Thu £25.99 £25.99

31-Jan Mon £25.99 £25.99 25-Feb Fri £31.99 £32.99

1-Feb Tue £25.99 £25.99 26-Feb Sat £25.99 £27.99

2-Feb Wed £25.99 £25.99 27-Feb Sun £25.99 £25.99

3-Feb Thu £26.99 £26.99 28-Feb Mon £25.99 £25.99

4-Feb Fri £26.99 £28.99 1-Mar Tue £25.99 £25.995-Feb Sat £25.99 £25.99 2-Mar Wed £25.99 £25.99

6-Feb Sun £25.99 £25.99 3-Mar Thu £25.99 £25.99

7-Feb Mon £25.99 £25.99 4-Mar Fri £25.99 £27.99

8-Feb Tue £25.99 £25.99 5-Mar Sat £25.99 £25.99

9-Feb Wed £25.99 £25.99 6-Mar Sun £25.99 £25.99

10-Feb Thu £25.99 £25.99 7-Mar Mon £25.99 £25.99

11-Feb Fri £27.99 £28.99 8-Mar Tue £25.99 £25.99

12-Feb Sat £25.99 £25.99 9-Mar Wed £25.99 £25.99

13-Feb Sun £25.99 £25.99 10-Mar Thu £25.99 £25.99

14-Feb Mon £25.99 £25.99 11-Mar Fri £27.99 £27.99

15-Feb Tue £25.99 £25.99 12-Mar Sat £25.99 £25.99

16-Feb Wed £25.99 £25.99 13-Mar Sun £25.99 £25.99

17-Feb Thu £25.99 £25.99 14-Mar Mon £25.99 £25.99

18-Feb Fri £27.99 £27.99 15-Mar Tue £25.99 £25.99

19-Feb Sat £25.99 £25.99 16-Mar Wed £25.99 £25.99

7/24/2019 FinalProject Ahmed ALANAZI

http://slidepdf.com/reader/full/finalproject-ahmed-alanazi 68/11868

Date Day

Reading-

1

8 Dec

Reading-

2

9 Dec Date Day

Reading-

1

8 Dec

Reading-

2

9 Dec

17-Mar Thu £25.99 £25.99 11-Apr Mon £25.99 £25.99

18-Mar Fri £27.99 £27.99 12-Apr Tue £25.99 £25.99

19-Mar Sat £27.99 £27.99 13-Apr Wed £25.99 £25.99

20-Mar Sun £25.99 £25.99 14-Apr Thu £25.99 £25.99

21-Mar Mon £27.99 £27.99 15-Apr Fri £25.99 £25.99

22-Mar Tue £25.99 £25.99 16-Apr Sat £28.99 £28.99

23-Mar Wed £25.99 £25.99 17-Apr Sun £30.99 £30.99

24-Mar Thu £25.99 £25.99 18-Apr Mon £25.99 £25.99

25-Mar Fri £27.99 £27.99 19-Apr Tue £25.99 £25.99

26-Mar Sat £27.99 £27.99 20-Apr Wed £25.99 £25.99

27-Mar Sun £28.99 £27.99 21-Apr Thu £25.99 £25.99

28-Mar Mon £25.99 £25.99 22-Apr Fri £25.99 £25.99

29-Mar Tue £25.99 £25.99 23-Apr Sat £25.99 £25.99

30-Mar Wed £25.99 £25.99 24-Apr Sun £27.99 £27.99

31-Mar Thu £25.99 £25.99 25-Apr Mon £28.99 £28.99

1-Apr Fri £25.99 £25.99 26-Apr Tue £25.99 £25.99

2-Apr Sat £25.99 £25.99 27-Apr Wed £25.99 £25.99

3-Apr Sun £28.99 £28.99 28-Apr Thu £27.99 £25.99

4-Apr Mon £25.99 £25.99 29-Apr Fri £37.99 £37.99

5-Apr Tue £25.99 £25.99 30-Apr Sat £32.99 £32.99

6-Apr Wed £25.99 £25.99 1-May Sun £25.99 £25.99

7-Apr Thu £25.99 £25.99 2-May Mon £25.99 £25.99

8-Apr Fri £25.99 £25.99 3-May Tue £25.99 £25.999-Apr Sat £25.99 £25.99 4-May Wed £25.99 £25.99

10-Apr Sun £28.99 £28.99 5-May Thu £25.99 £25.99

7/24/2019 FinalProject Ahmed ALANAZI

http://slidepdf.com/reader/full/finalproject-ahmed-alanazi 69/11869

Date Day

Reading-

1

8 Dec

Reading-

2

9 Dec Date Day

Reading-

1

8 Dec

Reading-

2

9 Dec

6-May Fri £30.99 £30.99 31-May Tue £25.99 £25.99

7-May Sat £25.99 £25.99 1-Jun Wed £25.99 £25.99

8-May Sun £30.99 £30.99 2-Jun Thu £25.99 £25.99

9-May Mon £25.99 £25.99 3-Jun Fri £25.99 £25.99

10-May Tue £25.99 £25.99 4-Jun Sat £25.99 £25.99

11-May Wed £25.99 £25.99 5-Jun Sun £32.99 £32.99

12-May Thu £25.99 £25.99 6-Jun Mon £25.99 £25.99

13-May Fri £27.99 £27.99 7-Jun Tue £25.99 £25.99

14-May Sat £25.99 £25.99 8-Jun Wed £25.99 £25.99

15-May Sun £25.99 £25.99 9-Jun Thu £25.99 £25.99

16-May Mon £28.99 £28.99 10-Jun Fri £25.99 £25.99

17-May Tue £25.99 £25.99 11-Jun Sat £25.99 £25.99

18-May Wed £25.99 £25.99 12-Jun Sun £25.99 £25.99

19-May Thu £25.99 £25.99

20-May Fri £27.99 £27.99

21-May Sat £25.99 £25.99

22-May Sun £27.99 £27.99

23-May Mon £25.99 £25.99

24-May Tue £25.99 £25.99

25-May Wed £25.99 £25.99

26-May Thu £25.99 £25.99

27-May Fri £35.99 £35.99

28-May Sat £43.99 £43.9929-May Sun £37.99 £37.99

30-May Mon £25.99 £25.99

2.  Price data for London-Amsterdam flight

Date Day Price Date Day Price Date Day Price

9-Dec Fri £68.99 18-Dec Sun £78.99 27-Dec Tue £60.99

10-Dec Sat £58.99 19-Dec Mon £71.99 28-Dec Wed £60.99

11-Dec Sun £228.99 20-Dec Tue £50.99 29-Dec Thu £71.99

12-Dec Mon £72.99 21-Dec Wed £60.99 30-Dec Fri £64.99

13-Dec Tue £38.99 22-Dec Thu £68.99 31-Dec Sat £50.99

14-Dec Wed £38.99 23-Dec Fri £80.99 1-Jan Sun £101.99

15-Dec Thu £38.99 24-Dec Sat NFA 2-Jan Mon £58.99

16-Dec Fri £68.99 25-Dec Sun £78.99 3-Jan Tue £34.99

17-Dec Sat £78.99 26-Dec Mon £76.99 4-Jan Wed £25.99

Date Day Price Date Day Price Date Day Price

5-Jan Thu £25.99 16-Feb Thu £31.99 30-Mar Thu £25.99

7/24/2019 FinalProject Ahmed ALANAZI

http://slidepdf.com/reader/full/finalproject-ahmed-alanazi 70/11870

6-Jan Fri £26.99 17-Feb Fri £82.99 31-Mar Fri £28.99

7-Jan Sat £31.99 18-Feb Sat £228.99 1-Apr Sat £43.99

8-Jan Sun £50.99 19-Feb Sun £78.99 2-Apr Sun £39.99

9-Jan Mon £26.99 20-Feb Mon £30.99 3-Apr Mon £26.99

10-Jan Tue £26.99 21-Feb Tue £25.99 4-Apr Tue £25.99

11-Jan Wed £26.99 22-Feb Wed £25.99 5-Apr Wed £25.99

12-Jan Thu £26.99 23-Feb Thu £25.99 6-Apr Thu £27.9913-Jan Fri £26.99 24-Feb Fri £26.99 7-Apr Fri £27.99

14-Jan Sat £28.99 25-Feb Sat £25.99 8-Apr Sat £40.99

15-Jan Sun £30.99 26-Feb Sun £26.99 9-Apr Sun £43.99

16-Jan Mon £25.99 27-Feb Mon £25.99 10-Apr Mon £27.99

17-Jan Tue £26.99 28-Feb Tue £25.99 11-Apr Tue £26.99

18-Jan Wed £26.99 1-Mar Wed £25.99 12-Apr Wed £25.99

19-Jan Thu £25.99 2-Mar Thu £27.99 13-Apr Thu £27.99

20-Jan Fri £26.99 3-Mar Fri £25.99 14-Apr Fri £27.99

21-Jan Sat £26.99 4-Mar Sat £25.99 15-Apr Sat £27.99

22-Jan Sun £26.99 5-Mar Sun £28.99 16-Apr Sun £37.99

23-Jan Mon £25.99 6-Mar Mon £25.99 17-Apr Mon £27.99

24-Jan Tue £26.99 7-Mar Tue £25.99 18-Apr Tue £25.99

25-Jan Wed £26.99 8-Mar Wed £25.99 19-Apr Wed £25.99

26-Jan Thu £31.99 9-Mar Thu £25.99 20-Apr Thu £27.99

27-Jan Fri £32.99 10-Mar Fri £25.99 21-Apr Fri £35.99

28-Jan Sat £26.99 11-Mar Sat £26.99 22-Apr Sat £27.99

29-Jan Sun £26.99 12-Mar Sun £28.99 23-Apr Sun £41.99

30-Jan Mon £25.99 13-Mar Mon £25.99 24-Apr Mon £27.99

31-Jan Tue £25.99 14-Mar Tue £25.99 25-Apr Tue £27.99

1-Feb Wed £26.99 15-Mar Wed £25.99 26-Apr Wed £26.99

2-Feb Thu £26.99 16-Mar Thu £26.99 27-Apr Thu £27.99

3-Feb Fri £31.99 17-Mar Fri £25.99 28-Apr Fri £35.99

4-Feb Sat £26.99 18-Mar Sat £25.99 29-Apr Sat £27.99

5-Feb Sun £26.99 19-Mar Sun £35.99 30-Apr Sun £46.99

6-Feb Mon £25.99 20-Mar Mon £25.99 1-May Mon £27.99

7-Feb Tue £25.99 21-Mar Tue £25.99 2-May Tue £25.99

8-Feb Wed £25.99 22-Mar Wed £25.99 3-May Wed £25.99

9-Feb Thu £25.99 23-Mar Thu £25.99 4-May Thu £25.99

10-Feb Fri £25.99 24-Mar Fri £25.99 5-May Fri £27.99

11-Feb Sat £36.99 25-Mar Sat £34.99 6-May Sat £27.99

12-Feb Sun £27.99 26-Mar Sun £45.99 7-May Sun £55.9913-Feb Mon £26.99 27-Mar Mon £30.99 8-May Mon £27.99

14-Feb Tue £25.99 28-Mar Tue £25.99 9-May Tue £27.99

15-Feb Wed £25.99 29-Mar Wed £27.99 10-May Wed £25.99

Date Day Price

11-May Thu £27.99

12-May Fri £27.99

13-May Sat £27.99

14-May Sun £44.99

7/24/2019 FinalProject Ahmed ALANAZI

http://slidepdf.com/reader/full/finalproject-ahmed-alanazi 71/11871

15-May Mon £30.99

16-May Tue £27.99

17-May Wed £25.99

18-May Thu £25.99

19-May Fri £27.99

20-May Sat £25.99

21-May Sun £30.9922-May Mon £27.99

23-May Tue £25.99

24-May Wed £25.99

25-May Thu £25.99

26-May Fri £35.99

27-May Sat £49.99

28-May Sun £39.99

29-May Mon £30.99

30-May Tue £27.99

31-May Wed £25.99

1-Jun Thu £25.99

2-Jun Fri £25.99

3-Jun Sat £27.99

4-Jun Sun £163.99

5-Jun Mon £78.99

6-Jun Tue £26.99

7-Jun Wed £25.99

8-Jun Thu £25.99

9-Jun Fri £27.99

10-Jun Sat £27.99

11-Jun Sun £35.99

7/24/2019 FinalProject Ahmed ALANAZI

http://slidepdf.com/reader/full/finalproject-ahmed-alanazi 72/11872

3. Questionnaire

1.  How often you travel?

a.  Frequently

 b.  Rarely

c.   Never

2.  What method you use for booking tickets?

a.  Buy ticket Online

 b.  Go to airline franchise

c.  Buy ticket through phone

d.  Both

3.  How often you book ticket online?

a.  Almost every week

 b.  Once in a month

c.  More than once in a month

d.  Once or twice in a year

4.  If you buy ticket online, which method you prefer?

a.  Visit airlines web site directly

 b.  Visit website which offers different airline services

c.  Both

5.  Do you think airlines web site provides all the facilities customer requires?

a.  Yes

 b.   No

c.  Can’t say

6.  Do you think website which offers different airline services provides all the facilities customer

requires?

a.  Yes

 b.   No

c.  Can’t say

7/24/2019 FinalProject Ahmed ALANAZI

http://slidepdf.com/reader/full/finalproject-ahmed-alanazi 73/11873

7.  Do you think airline websites are user friendly?

a.  Yes

 b.   No

c.  Can’t say

8.  What do you think should be included to make airline websites friendlier?

 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

9.  Do you think airline websites are user friendly?

a.  Yes

 b.   Noc.  Can’t say

10. Are you comfortable with the flight search methods which airlines provide?

a.  Yes

 b.   No

c.  Can’t 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.  Can’t say

13. What do you think should be included to make flight reservation process more comfortable?

 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

7/24/2019 FinalProject Ahmed ALANAZI

http://slidepdf.com/reader/full/finalproject-ahmed-alanazi 74/11874

 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

14. Are you comfortable with the airline pricing system?

a.  Yes

 b.   No

c.  Can’t say

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.  Can’t 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.  Can’t say

19. Did the airline provide any type of alternate solution while there system was down?

a.  Yes

 b.   No

c.  Can’t say

7/24/2019 FinalProject Ahmed ALANAZI

http://slidepdf.com/reader/full/finalproject-ahmed-alanazi 75/11875

20. What was the solution if answer to Question 19 is “Yes”? 

 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

21. What you have done why system was down?

 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

22. Do you think airlines flight scheduling is up to the mark according to the customer requirements?

a.  Yes

 b.   No

c.  Can’t say

23.  If answer to Question 22 is “No”, then please provide the problem you faced while booking tickets?  

 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

24. Do the airlines give on time season offers?

a.  Yes

 b.   No

c.  Can’t say

25. Do you found these offers attractive?

a.  Yes

 b.   No

c.  Can’t say

26. Are the fares in the season offers are reasonable?

7/24/2019 FinalProject Ahmed ALANAZI

http://slidepdf.com/reader/full/finalproject-ahmed-alanazi 76/11876

a.  Yes

 b.   No

c.  Can’t say

27. What do you suggest to improve the season offers and things which should be included?

 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

28. Any other suggestions?

 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

7/24/2019 FinalProject Ahmed ALANAZI

http://slidepdf.com/reader/full/finalproject-ahmed-alanazi 77/11877

4. Extended project proposal

Computer Science Modular Masters Project May 2010

Extended Project Proposal

Student Family Name:ALANAZI

Student First Name:AHMED

Student Registration Number:07169574

Supervisor Name:Dr Boekhorst, Rene te

Award Title:Computer science

Second Marker Name:Dr Bennett, Steve

Project Title/Research Question:Flight Reservation System

- Which factors behind airlines prices changes?

- To what extent these factors might change in various airlines?

Student Signature:

Date: 28 June 2010

7/24/2019 FinalProject Ahmed ALANAZI

http://slidepdf.com/reader/full/finalproject-ahmed-alanazi 78/11878

Table of Contents

Index Section PageNumber

1 Introduction 3

2 Methodology 4

3 Functions 5

4 Objectives 5

5 Time plan 6

6 Hardware/Software Requirements 7

7 Bibliography 8

7/24/2019 FinalProject Ahmed ALANAZI

http://slidepdf.com/reader/full/finalproject-ahmed-alanazi 79/11879

Introduction

Over the last years, the evolution of airline industry has shown a significant increase ofnumber of customers. This huge increment was the main reason of the severe demandfor developing automatic system which provides fast and easy service for thosecustomers. (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 systemplays a vital role in facilitating the potential customers of an airline. It helps the airlinesby streamlining their process of reservation without human interaction thus enablingthem 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 wheninformation such as route, aircraft, schedule and fare about flight was published byairlines in large books. Travel agents had the tough job to look into separate books forreservations that involve multiple airlines. It was a dream to get a real time picture ofavailable seats because airlines share information at day end only. American Airlinewas the first to build the computerized system to allow access to real time data to all itsoffices. In 1964, Semi-Automated Business Research Environment (SABRE) wasdeveloped 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 suchas 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 airlinehas different pricing strategy and there are several factors might affect prices. Forexample flight fares might change as a result of timing, seasons, availability,competition and demand.

7/24/2019 FinalProject Ahmed ALANAZI

http://slidepdf.com/reader/full/finalproject-ahmed-alanazi 80/11880

Scope and MethodologyThe aim of this project is to understand how does pricing system work and try to figure

out which factors that affect airlines prices. Also it aims to produce and develop anairline reservation system which will help people to book tickets for their trips. Airlinereservation system is complex system and making it to be managed by software systeminstead of human will reduce the error percentage by a huge margin. It will makeprocess of scheduling trips easier and prevent clashes of confirmed bookings; timesoverlap and so many other problems associated with the mass scale reservation tasks.

More importantly it will help the airline to see the real time picture of the available seatsand perform analytical processing to determine the feasibility of current flight schedules.

It will help customers to book their tickets from their homes and the pricing system willbe automated to increase or decrease depending on the parameters of choice such asseason, availability of seats and time of booking. This system may also enable theairline to implement special processes for their corporate customers. Our intendedsystem would be a web based system which will be available 24/7 to allow customers tobook their tickets anytime. I have divided this project into 3 major phases which are

 Requirement Gathering

This phase includes identification of all the functionalities which will be covered in

the prototype for the scope of this project. Reading previous researches about

airlines pricing systems in order to gain more knowledge.

 Research on the current web technologies

 As this will be the web application I will do research on I have choose ASP.NET withC Sharp for the development of this prototype. (Sanderson, 2009)

 Software Development and Reports

For the software development I will use RUP (Rational Unified Process) as thedevelopment process and Prototype as development model. (Bergstrom & Raberg,

2004)

7/24/2019 FinalProject Ahmed ALANAZI

http://slidepdf.com/reader/full/finalproject-ahmed-alanazi 81/11881

Figure 1: System Analysis Diagram

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

7/24/2019 FinalProject Ahmed ALANAZI

http://slidepdf.com/reader/full/finalproject-ahmed-alanazi 82/11882

Objectives

The project objectives should be set before the start of project because they provide aguideline during the whole project and prevent researcher/developer to progress inwrong 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 timeframe of this project.

-  basic objectives of the project  Doing a research for Investigating and understanding the airlines

pricing mechanism.

  Implementing an airline reservation system depends on the researchfindings: 

  Allowing customers to register to the system.  Allowing customers to log in.

  Customers can search for flight by date.

  Customers can book flight and make reservation.

  Customers can view their reservation status and details.

  Customers can cancel their reservation.

-  advanced objectives of the project Allowing customers to confirm tickets by doing payment for their trips.

 Allowing customers to get ticket electronically (e-ticket). Giving customers seasonal and other discount offers.

 Giving customers a price comparison for the trip they want to book.

 All Bookings will be shown for Admin.

 A waiting list customers will be activated.

7/24/2019 FinalProject Ahmed ALANAZI

http://slidepdf.com/reader/full/finalproject-ahmed-alanazi 83/11883

Time Plan for the Project

Work Description Days

Requirement AnalysisInvestigating and research the airlines pricing system 10

System and software requirements 1

Producing draft document 1

Literature ReviewSoftware development processes and models 2

Current Web technologies and its use in the software industry 2

.NET technology standards and how it can help in developing web based

systems

2

.NET technology comparisons with other available technologies 2

How I can use .NET technologies for the development of “Airline Reservation

System” 

2

Producing draft document 2

Design and Analysis PhaseDesign database schema 3

Model user and system requirements (UML diagrams) 2

Produce GUI mockups 2

Producing draft document 2

System DevelopmentImplementation of “Airline Reservation System”  15

Producing draft document 1

Evaluation and TestingTesting of the system 1

Critical analysis 1

Evaluation of the system against objectives 1

Producing draft document 1

Dissertation ReportWriting dissertation report using all the draft documents 10

Producing appendixes section 1

Total 64

7/24/2019 FinalProject Ahmed ALANAZI

http://slidepdf.com/reader/full/finalproject-ahmed-alanazi 84/11884

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

7/24/2019 FinalProject Ahmed ALANAZI

http://slidepdf.com/reader/full/finalproject-ahmed-alanazi 85/11885

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'svoice 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. Desmond (1989). Max Hopper knows Sabre's 'software guts': Americanpushing limits of software at 2,000+ TPS - transactions per second.

 Available:http://findarticles.com/p/articles/mi_m0SMG/is_n2_v9/ai_7349011. Lastaccessed June 2010.

7/24/2019 FinalProject Ahmed ALANAZI

http://slidepdf.com/reader/full/finalproject-ahmed-alanazi 86/11886

5. Progress report 1

Modular Masters Programme in Computer Science

Project Modules - Progress Report 1

Name: Ahmed ALANAZI Supervisor: Boekhorst,Rene te

Title of Project: Flight Reservation System  Date: 09/07/10

Work completed since last reportOur first task on this project was to find out the factors that changes the air ticket prices and to

some extent see how much these factors may differ across different airlines.

I have started with searching out the factors by visiting different airlines websites and also

consulting the statistical agencies that publish the historical data regarding the ticket price

change for several destinations.

 After all the research and evaluation of historical data, I believe following are the major factors

that we can use in our project either in full or partial state.

1. Jet Fuel Prices in international market.

2. Season

3. Time of flight

4. Time of purchase (usually early birds gets discount)

5. Day of flight

6. Route popularity

7. Plane loads (how full planes are)

8. Similar flight fare from competitor

9. Airport congestion

10. Local events near the flight time (such as the world cup)

7/24/2019 FinalProject Ahmed ALANAZI

http://slidepdf.com/reader/full/finalproject-ahmed-alanazi 87/11887

What I have learntThere are so many interesting pricing factors and myths are now part of our knowledgebase.

Such as not only the day we travel but the day we purchase matters. According to research by

wired.com, price drop usually come early in the week. Common wisdom of buying tickets farther

in advance usually does not save money. According to research, the lowest price tends to hit

between eight and two weeks before departure.The price from one origin to a particular destination varies giving seemingly random fares

depending on unknown factors. As the prices change so rapidly and based on several known

and unknown factors, it is very hard to predict the air fare in advance. Also different airlines can

weigh a particular price factor differently.

In short prices of a particular trip are calculated based on some BASE FARE and then applying

the different factors such as described above. So at different times, fare of a particular trip might

be 150% of the base price or just the 50% of the base price. It all depends how we weigh

different factors.

Problems encountered and impact of these on schedule Although we have so many data available about the fare from one particular origin to a

particular destination but it is hard to analyze as what factor exactly caused the price change.

We have historical statistical data such as average prices and ATPI (Air Travel Price Index)

available on Bureau of transportation statistics site for all major airport of US comparing pricing

each quarter for several years. However learning about the exact pricing factor(s) and how they

influence may require consultation with some airline. I believe this will lead us to another way

and would be out of the scope of this project.

Work to be done over next period

I will be working out next about how these factors can be formulated to calculate a fare. Also Iwill be dealing with the architectural and database design of the application.

7/24/2019 FinalProject Ahmed ALANAZI

http://slidepdf.com/reader/full/finalproject-ahmed-alanazi 88/11888

6. Progress report 2

Modular Masters Program in Computer Science

Project Modules - Progress Report 2

Name: Ahmed ALANAZI Supervisor: Dr Rene

Title of Project: Flight Reservation System Date: 26/07/10

Work completed since last reportIn the last period, I had found some factors that may cause the airfare to fluctuate. In current

period, I continued to research about the history of air pricing and its hidden mechanics. I have

found that the air ticket pricing is a complex procedure that would involve extensive numerical

analysis. I have tried to formulate the method that would tell the system that how these factors

will be used to make pricing decisions. Though this algorithm just a simplest step of what

airlines would actually do to quote a fare, but this will serve our purpose.

 Apart of algorithm development, I have worked on two major parts of the report writing. By now I

have completed draft for introduction and literature review sections of the report and both of

these are close to the final shape.

What I have learntPricing methods.

Pricing algorithms and underlying mathematical calculations.

Professional report writing.

Problems encountered and impact of these on scheduleMajor problem I have faced in this period is to understand the mechanics of the pricing. There

were little problems related to report structuring and transforming the raw information into

professional and reader’s f riendly report sections, but I successfully managed to sort these

problems following the industry standards. I do not see any problem with my progress to meet

the project schedule.

7/24/2019 FinalProject Ahmed ALANAZI

http://slidepdf.com/reader/full/finalproject-ahmed-alanazi 89/11889

Work to be done over next periodNow I will be working on the design of the application and some of the implementation

diagrams. I will also be working on the next sections in my report document.

7/24/2019 FinalProject Ahmed ALANAZI

http://slidepdf.com/reader/full/finalproject-ahmed-alanazi 90/11890

7. Progress report 3

Modular Masters Programme in Computer Science

Project Modules - Progress Report 3

Name: Ahmed Alanazi Supervisor: Dr Rene

Title of Project: Flight Reservation System Date: 10/08/10

Work completed since last reportSince the start of the project, I have found the factors that influence on the airfare. By now I

have the final shape of the pricing algorithm that will be implemented in our system. In report

writing, I have finalized the introduction and literature review section. Apart from these, I have

worked on the DB design of the project. DB schema has been prepared along with the basic

UML (use cases diagrams). I have worked on the GUI design of the application and all

functional screens have been designed. An abstract site navigation flow has been designed and

is in process of implementation now. Now I am progressing with the implementation of business

rules and application data flow.

What I have learntDatabase Design and schema generation.

Basic UML diagrams such as use case diagram and navigation flow.

GUI designing.

Web pages development (design only) in Visual studio .net and implementing navigation.

Research on the usage of built in login controls available in MS .Net.

Writing code in C# to implement the business logic.

Problems encountered and impact of these on scheduleI am having little problem with getting familiar to more advance controls in .Net. I am trying to

get the grid controls work so that I can implement the search results screen which is the major

screen of this project. At the moment I do not see any major risk that would impact the project

schedule.

7/24/2019 FinalProject Ahmed ALANAZI

http://slidepdf.com/reader/full/finalproject-ahmed-alanazi 91/11891

Work to be done over next periodI will be working on the report writing and implementation of the business logic of the project.

7/24/2019 FinalProject Ahmed ALANAZI

http://slidepdf.com/reader/full/finalproject-ahmed-alanazi 92/11892

8. Progress report 4

Modular Masters Programme in Computer Science

Project Modules - Progress Report 4

Name: Ahmed ALANAZI Supervisor: Dr Rene

Title of Project: Flight Reservation System Date: 24/08/10

Work completed since last reportIn the past two weeks I have been working mainly on the implementation of the web application.

Major functionality for searching and reserving the seat has been completed by now. I am

progressing with few of the pages that need to be implemented for the administrator of the web

application to set up the basic data about flights, its locations and pricing of a particular flight.

What I have learntWeb pages implementation.

Design and implementation of three tier architecture for our application.

Problems encountered and impact of these on scheduleProblems with implementations of the three tier architecture using separate projects for each

layer. I also faced little problem with the handling of inline and external design sheets (css) for

the site.

7/24/2019 FinalProject Ahmed ALANAZI

http://slidepdf.com/reader/full/finalproject-ahmed-alanazi 93/11893

Work to be done over next period After completion of the administration module, I will resume the documentation and report

writing for the project.

7/24/2019 FinalProject Ahmed ALANAZI

http://slidepdf.com/reader/full/finalproject-ahmed-alanazi 94/11894

9. Project code

Index.aspx

using System;using System.Collections;using System.Configuration;using System.Data;using System.Linq;using System.Web;using System.Web.Security;using System.Web.UI;using System.Web.UI.WebControls;using System.Web.UI.WebControls.WebParts;using System.Web.UI.HtmlControls;using 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);

elsesrchData.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");

}

7/24/2019 FinalProject Ahmed ALANAZI

http://slidepdf.com/reader/full/finalproject-ahmed-alanazi 95/11895

protected void chkbOneWayOnly_CheckedChanged(object sender, EventArgs e)

{if (chkbOneWayOnly.Checked)

rfvReturn.Enabled = false;else

rfvReturn.Enabled = true;}

}}

Flight.aspx

using System;using System.Collections;using System.Configuration;

using System.Data;using System.Linq;using System.Web;using System.Web.Security;using System.Web.UI;using System.Web.UI.WebControls;using System.Web.UI.WebControls.WebParts;using System.Web.UI.HtmlControls;using System.Xml.Linq;using System.Collections.Generic;using 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;

7/24/2019 FinalProject Ahmed ALANAZI

http://slidepdf.com/reader/full/finalproject-ahmed-alanazi 96/11896

if (InboundPanel.Visible && srchData!=null){

inBoundFlightsList = FlghtBL.getFlights(srchData.To,srchData.From);

ViewState["inBoundFlightsList"] = inBoundFlightsList;inboundCalendar.VisibleDate = srchData.Return;

}

flightPricesList = FlghtBL.getFlightPrices(srchData.From,srchData.To);

ViewState["flightPricesList"] = flightPricesList;}else{

outBoundFlightsList = (List<FlightsData>)ViewState["outBoundFlightsList"];

if (InboundPanel.Visible)inBoundFlightsList = (List<FlightsData>)

ViewState["inBoundFlightsList"];flightPricesList =

(List<FlightPricesData>)ViewState["flightPricesList"];

}

}

protected void Calendar2_DayRender(object sender, DayRenderEventArgs e)

{//outboundCalendarDay 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 (outBoundFlightsList != null)

{foreach (FlightsData fd in outBoundFlightsList){

if (cDay.Date >= fd.effectiveFrom&& cDay.Date <= fd.effectiveTo&& cDay.Date.DayOfWeek ==

ConvertToDayOfWeek(fd.weekday)){

//dispay label//caculate price//store price and display it.

7/24/2019 FinalProject Ahmed ALANAZI

http://slidepdf.com/reader/full/finalproject-ahmed-alanazi 97/11897

Label blanklbl = new Label();blanklbl.Text = "<br/>";tCell.Controls.Add(blanklbl);

Label lbl = new Label();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.From, srchData.To);pricelbl.Text = "£" + flightPrice.ToString();tCell.Controls.Add(pricelbl);

RadioButton rdBtn = new RadioButton();rdBtn.GroupName = "FLIGHTS";rdBtn.Attributes.Add("onclick", e.SelectUrl);if (cDay.IsSelected){

rdBtn.Checked = true;//update hidden value.selectedOutBoundFlight.Value = fd.flightID + "," 

+ cDay.Date.ToString()+ "," + pricelbl.Text;

Session["SelectedOutBoundFlightID"] =fd.flightID;

Session["SelectedOutBoundFlightDate"] =cDay.Date;

Session["SelectedOutBoundFlightPrice"] =flightPrice;

fd.FlightDate = cDay.Date;Session["SelectedFlightsDataOutBound"] = fd;

lblOutBoundFlightError.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 buttonlblOutBoundFlightError.Text = "No flights available, please

search again";lblOutBoundFlightError.Visible = true;

}}

private DayOfWeek ConvertToDayOfWeek(string weekday){

7/24/2019 FinalProject Ahmed ALANAZI

http://slidepdf.com/reader/full/finalproject-ahmed-alanazi 98/11898

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();

7/24/2019 FinalProject Ahmed ALANAZI

http://slidepdf.com/reader/full/finalproject-ahmed-alanazi 99/11899

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 buttonlblInBoundFlightError.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

7/24/2019 FinalProject Ahmed ALANAZI

http://slidepdf.com/reader/full/finalproject-ahmed-alanazi 100/118100

lblOutBoundFlightError.Text = "Please select outboundflight";

lblOutBoundFlightError.Visible = true;}else if(InboundPanel.Visible==true &&

selectedInBoundFlight.Value==String.Empty){

//plz select inbound flightlblInBoundFlightError.Text = "Please select inbound flight";lblInBoundFlightError.Visible = true;

}else

Response.Redirect("Itinerary.aspx");}

protected void btnSearchAgain_Click(object sender, EventArgs e){

Response.Redirect("index.aspx");}

}

}

Passengers.aspx

using System;using System.Collections;using System.Configuration;using System.Data;using System.Linq;using System.Web;using System.Web.Security;using System.Web.UI;using System.Web.UI.WebControls;

using System.Web.UI.WebControls.WebParts;using System.Web.UI.HtmlControls;using 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 passengersfor (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

7/24/2019 FinalProject Ahmed ALANAZI

http://slidepdf.com/reader/full/finalproject-ahmed-alanazi 101/118101

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 passengersfor (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 passengersfor (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:

7/24/2019 FinalProject Ahmed ALANAZI

http://slidepdf.com/reader/full/finalproject-ahmed-alanazi 102/118102

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 System;using System.Collections;using System.Configuration;using System.Data;

7/24/2019 FinalProject Ahmed ALANAZI

http://slidepdf.com/reader/full/finalproject-ahmed-alanazi 103/118103

using System.Linq;using System.Web;using System.Web.Security;using System.Web.UI;using System.Web.UI.WebControls;using System.Web.UI.WebControls.WebParts;using System.Web.UI.HtmlControls;using 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 id2- generate booking reference no3- make entry into flight_booking table4- make entry into flight passengers* <end transaction>5- Show e-ticket page.*/

#region Get Session DataSearchData 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 idint paymentID = MakePayment();//2- generate booking reference nostring bookRef = BookingManager.generateBoookingReference();Session["MyBookingRef"] = bookRef;

//3-a insert outbound flight booking

7/24/2019 FinalProject Ahmed ALANAZI

http://slidepdf.com/reader/full/finalproject-ahmed-alanazi 104/118104

myPymentBL.InsertFlightBooking(outBoundFlightID,outBoundFlightDate, srchData.FlightClass

, bookRef,srchData.NoOfPassengers, paymentID);

//3-b if applicable, insert inbound flight bookingif (!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 screenPassengersBL 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();}

7/24/2019 FinalProject Ahmed ALANAZI

http://slidepdf.com/reader/full/finalproject-ahmed-alanazi 105/118105

private int MakePayment(){

return myPymentBL.MakePayment(txtBillingAddLine1.Text,txtBillingAddLine2.Text

, txtBillingAddLine3.Text,txtBillingAddLine4.Text

, ddlCountry.SelectedValue,txtCardHolderName.Text

, txtCardNo.Text,Int32.Parse(ddlCardType.SelectedValue)

,Int32.Parse(ddlExpiryMonth.SelectedValue)

, ddlExpYear.SelectedValue,txtSecNo.Text, totalFare);

}}

}

FlightLocationMgmnt.aspxusing System;using System.Collections;

using System.Configuration;using System.Data;using System.Linq;using System.Web;using System.Web.Security;using System.Web.UI;using System.Web.UI.WebControls;using System.Web.UI.WebControls.WebParts;using System.Web.UI.HtmlControls;using 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();

7/24/2019 FinalProject Ahmed ALANAZI

http://slidepdf.com/reader/full/finalproject-ahmed-alanazi 106/118106

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 = "No Locations Available

yet";}

}

protected void GridView1_RowCancelingEdit(object sender,GridViewCancelEditEventArgs e)

{GridView1.EditIndex = -1;FillFlightLocationsGrid();

}

protected void GridView1_RowCommand(object sender,GridViewCommandEventArgs e)

{if (e.CommandName.Equals("AddNew")){

string airportCode =((TextBox)GridView1.FooterRow.FindControl("txtNewAirportCode")).Text;

string airportName =((TextBox)GridView1.FooterRow.FindControl("txtNewAirportName")).Text;

string cityCode =((TextBox)GridView1.FooterRow.FindControl("txtNewCityCode")).Text;

string cityName =((TextBox)GridView1.FooterRow.FindControl("txtNewCityName")).Text;

int timeZone =Int32.Parse(((DropDownList)GridView1.FooterRow.FindControl("ddlNewTimeZone")).SelectedValue);

flmBL.Insert(airportCode,cityCode,timeZone,cityName,airportName);showFooter.Value = "N";FillFlightLocationsGrid();

}else if (e.CommandName.Equals("CancelAddNew")){

showFooter.Value = "N";FillFlightLocationsGrid();

}}

protected void GridView1_RowDeleting(object sender,GridViewDeleteEventArgs e)

{

flmBL.Delete(Convert.ToInt32(GridView1.DataKeys[e.RowIndex].Value.ToString()));

FillFlightLocationsGrid();}

protected void GridView1_RowEditing(object sender,GridViewEditEventArgs e)

{GridView1.EditIndex = e.NewEditIndex;FillFlightLocationsGrid();

}

7/24/2019 FinalProject Ahmed ALANAZI

http://slidepdf.com/reader/full/finalproject-ahmed-alanazi 107/118107

protected void GridView1_RowUpdating(object sender,GridViewUpdateEventArgs e)

{string airportCode =

((TextBox)GridView1.Rows[e.RowIndex].FindControl("txtAirportCode")).Text;string airportName =

((TextBox)GridView1.Rows[e.RowIndex].FindControl("txtAirportName")).Text;string cityCode =

((TextBox)GridView1.Rows[e.RowIndex].FindControl("txtCityCode")).Text;string cityName =

((TextBox)GridView1.Rows[e.RowIndex].FindControl("txtCityName")).Text;int timeZone =

Int32.Parse(((DropDownList)GridView1.Rows[e.RowIndex].FindControl("ddlTimeZone")).SelectedValue);

int key =Convert.ToInt32(GridView1.DataKeys[e.RowIndex].Value.ToString());

flmBL.Update(key, airportCode, cityCode, timeZone, cityName,airportName);

GridView1.EditIndex = -1;FillFlightLocationsGrid();

}

protected void GridView1_RowDataBound(object sender,GridViewRowEventArgs e)

{if (e.Row.RowType == DataControlRowType.Footer){

if (showFooter.Value == "N")e.Row.Visible = false;

}}

protected void btnAddNew_Click(object sender, EventArgs e){

showFooter.Value = "Y";FillFlightLocationsGrid();

}

}}

FlightManagement.aspx

using System;using System.Collections;using System.Configuration;

using System.Data;using System.Linq;using System.Web;using System.Web.Security;using System.Web.UI;using System.Web.UI.WebControls;using System.Web.UI.WebControls.WebParts;using System.Web.UI.HtmlControls;using System.Xml.Linq;

namespace FRSWeb.Admin{

7/24/2019 FinalProject Ahmed ALANAZI

http://slidepdf.com/reader/full/finalproject-ahmed-alanazi 108/118108

public partial class FlightManagement : System.Web.UI.Page{

protected void Page_Load(object sender, EventArgs e){

}}

}

FlightPriceMgmnt.aspx

using System;using System.Collections;using System.Configuration;using System.Data;using System.Linq;using System.Web;using System.Web.Security;using System.Web.UI;using System.Web.UI.WebControls;using System.Web.UI.WebControls.WebParts;

using System.Web.UI.HtmlControls;using 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 touser*/

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";

7/24/2019 FinalProject Ahmed ALANAZI

http://slidepdf.com/reader/full/finalproject-ahmed-alanazi 109/118109

}}

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")).Text);

double competitorAdjustment =Double.Parse(((TextBox)GridView1.FooterRow.FindControl("txtCompetitorAdjustment")).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)

{

7/24/2019 FinalProject Ahmed ALANAZI

http://slidepdf.com/reader/full/finalproject-ahmed-alanazi 110/118110

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")).Text);

double localEvent =Double.Parse(((TextBox)GridView1.Rows[e.RowIndex].FindControl("txtLocalEvent")).Text);

double competitorAdjustment =Double.Parse(((TextBox)GridView1.Rows[e.RowIndex].FindControl("txtCompetitorAdjustment")).Text);

double loadAdjustment =Double.Parse(((TextBox)GridView1.Rows[e.RowIndex].FindControl("txtLoadAdjustment")).Text);

double misc =Double.Parse(((TextBox)GridView1.Rows[e.RowIndex].FindControl("txtMisc")).Text);

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")

7/24/2019 FinalProject Ahmed ALANAZI

http://slidepdf.com/reader/full/finalproject-ahmed-alanazi 111/118111

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 System;using System.Collections.Generic;using System.Linq;using 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 thenmodified according to my needs.

//code courtesy: http://ramanisandeep.wordpress.com/tag/generate-unique-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);

7/24/2019 FinalProject Ahmed ALANAZI

http://slidepdf.com/reader/full/finalproject-ahmed-alanazi 112/118112

StringBuilder result = new StringBuilder(maxSize) ;

foreach(byte b in data ){

result.Append(chars[b % (chars.Length - 1)]);}

return result.ToString().ToUpper();}

}}

FlightsBL.cs

using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Data;using 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 listflightDataRecord.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);

7/24/2019 FinalProject Ahmed ALANAZI

http://slidepdf.com/reader/full/finalproject-ahmed-alanazi 113/118113

}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 listflightPriceRecord.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 System;using System.Collections.Generic;

using System.Linq;using System.Text;

using FRS.DataLayer.Objects;using FRS.DataLayer;

namespace FRS.BusinessLayer{

public class PaymentBL{

SqlHelper paymentSQLHelper;

7/24/2019 FinalProject Ahmed ALANAZI

http://slidepdf.com/reader/full/finalproject-ahmed-alanazi 114/118114

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++)

7/24/2019 FinalProject Ahmed ALANAZI

http://slidepdf.com/reader/full/finalproject-ahmed-alanazi 115/118115

{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 System;using System.Collections.Generic;using System.Linq;using System.Text;

namespace FRS.BusinessLayer{

public class PricingManager{

/*This class will be used to implement the pricing factorsthat are further to what we already have in database.

For instance if company policy is to give 10% disc if the ticket itbeing 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 firstpriceQuote = fpd.FixedPrice;

/*Add the discount according to our findings throughanalysis

Chart constructed in terms of weeks ahead (No of weeksleft in the flight date at the

* time of booking with a discount % on the base price*Weeks ahead Discount

7/24/2019 FinalProject Ahmed ALANAZI

http://slidepdf.com/reader/full/finalproject-ahmed-alanazi 116/118116

*0 0%*1 30%*2 35%*3 40%*4 50%*5 or more 60%* */

TimeSpan ts = flightDate - DateTime.Now;

/*We will also do the day of the flight factor here*/if (flightDate.DayOfWeek == DayOfWeek.Saturday

|| flightDate.DayOfWeek == DayOfWeek.Sunday)//flight on a weekend

{if (ts.Days < 4 * 7) //less than 4 weeks or more

priceQuote *= 1.25; //25% increase

else if (ts.Days >= 4 * 7) //4 weeks or morepriceQuote *= 1.04; //4% increase

}

if (ts.Days > 5 * 7) //5 weeks or morepriceQuote *= 0.40;

else if (ts.Days > 4 * 7) //4 weeks or morepriceQuote *= 0.50;

else if (ts.Days > 3 * 7) //3 weeks or morepriceQuote *= 0.60;

else if (ts.Days > 2 * 7) //2 weeks or morepriceQuote *= 0.65;

else if (ts.Days > 1 * 7) //1 weeks or morepriceQuote *= 0.70;

//origin and dest specific discount if anyif (origin == "9" && dest == "11")

priceQuote -= 10.00; //further 10 discount for flightfrom 9 to 11

if (flightClass == "Business")priceQuote *= 1.5;

else if (flightClass == "First")priceQuote *= 2;

break;}

}

return priceQuote;

}}

}

FlightsDL.cs

using System;using System.Data;

7/24/2019 FinalProject Ahmed ALANAZI

http://slidepdf.com/reader/full/finalproject-ahmed-alanazi 117/118117

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("

+ " (selectmax(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("

+ "(selectmax(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"

7/24/2019 FinalProject Ahmed ALANAZI

http://slidepdf.com/reader/full/finalproject-ahmed-alanazi 118/118

+ " where "+

"(flight_origin="+origin+ " and

flight_destination="+dest+ ")"+ " or"+ "("+ "

flight_origin="+dest+ " and

flight_destination="+origin+ ")"

+ ")";return SqlHelper.ExecuteDataTable(query);

}}

}