
AIRLINE RESERVATION SYSTEM
PROJECT
June 19, 2001
Sharon D. Baker
Airline Reservation Project
Write a reservation system for an airline flight. Assume the airplane has 10 rows with 4 seats each row. Use a two dimensional array of strings to maintain a seating chart. In addition, create an array to be used as a waiting list in case the plan is full. The waiting list should be "first come, first serve", that is, people who are added early to the list get priority over those added later.
Project Requirements:
1. The Software Requirements Specification document. Use the IEEE SRS Guideline.
2. The Software Design Model. Include use cases, flow charts, pseudo-code and top-down design.

STEP 1:
ANALYZING THE PROBLEM
Requirements
Analysis (Analyzing the Problem):
Create a reservation system for an airline flight that has 10 rows with 4 seats in each row. In addition, create an array to be used as a waiting list in case the plane is full. The waiting list should be "first come, first served," where passengers who are added to the list early get priority over those added later. Allow the user (assumption is gate agent) to add a passenger to the flight or waiting list; remove a passenger from the flight or to quit the program.
Solution Description:
1. Declare a two-dimensional array of Seating ID by Passenger Name
2. Enter flight data. (A gate agent enters seating data as passengers check in for flight).
3. Accumulate seating data in the array.
4. Create Waiting List on a "First Come, First Serve" option.
5. Create Remove Passenger List (A gate agents enters information.)
6. Gate Agent can exit or terminate the program as the flight schedule mandates.

STEP 2:
DEVELOPING THE STRUCTURE
CHART


STEP 3:
DEVELOPING THE IPO CHART


STEP 4:
WRITING THE ALGORITHMS
STEP 5:
DRAWING THE FLOWCHARTS
NOTE:
See attached Excel File for
Algorithms and Flowcharts

STEP 6:
INTERNAL AND EXTERNAL
DOCUMENTATION
|
Activity |
Deliverables |
|
Requirements Analysis |
Feasibility Study |
|
|
Outline Requirements |
|
Requirements Definition |
Requirements Document |
|
System Specification |
Functional Specification |
|
|
Acceptance Test Plan |
|
|
Draft User Manual |
|
Architectural Design |
Architectural Specification |
|
|
System Test Plan |
|
Interface Design |
Interface Specification |
|
|
Integration Test Plan |
|
Detailed Design |
Design Specification |
|
|
Unit Test Plan |
|
Coding |
Program Code |
|
Unit Testing |
Unit Test report |
|
Module Testing |
Module Test Report |
|
Integration Testing |
Integration Test Report |
|
|
Final User Manual |
|
System Testing |
System Test report |
|
Acceptance Testing |
Final System + Documentation |
Step 6: Internal and External Documentation
Requirements Analysis:
Solution Description:
1. Declare a two-dimensional array of Seating ID by Passenger Name
2. Enter flight data. (A gate agent enters seating data as passengers check in for flight).
3. Accumulate seating data in the array.
4. Create Waiting List on a "First Come, First Serve" option.
5. Create Remove Passenger List (A gate agents enters information.)
Assumptions:
1. The gate agent is responsible for assuring passenger information is entered as the check-in at the gate for the flight.
2. The gate agent is responsible for assuring that no passenger is removed from the Flight Manifest or Wait List charts in error.
3. The results can be printed by the program and can be stored for retrieval at a later date.
4. Seating is identified in the two-dimensional array by row values 1 to 4 and column values 1 to 10.
Step 1: Decide on the output reports that are needed:
1. Passenger Flight Manifest all records/all fields
2. Passenger Flight Waiting List "First Come; First Serve"
Step 2: List all data needed to produce the output reports
1. P_ID
2. last_name
3. first_name
4. F_NO
5. seat_number
6. departure_time
7. arrival_time
8. gate_number
9. departure_location
10. arrival_location
11. payment_id
12. ticket_price
13. payment_method
14. meal_type
15. aircraft_type
16. seat_location
Step 3: Divide data into interrelated files.
Passenger Information Flight Information Payment Information
P_ID F_NO payment_id
F_NO seat_number ticket_price
payment_id departure_time payment_method
last_name arrival_time
first_name gate_number
meal_type departure_location
arrival_location
aircraft_type
seat_location
Step 4: Develop system schema



F_NO
P_ID
![]()
![]()
Step 5: Develop the data dictionary and record layouts for all files.
File:
FLIGHT File:
PASSENGER
Field Field Name Type Width Dec Field Field Name Type Width Dec
1 F_NO Numeric 5 1
P_ID Numeric 10 0
2 seat_number Character 5 2
F_NO Numeric 5 0
3 departure_time Date 8 3 payment_id
Numeric 5
4 arrival_time Date
8 4 last_name Character 15
5 gate_number Numeric 5 5 first_name Character 15
6 departure_location Character
10 6 meal_type Character 10
7 arrival_location Character 10
8 aircraft_type Character 10
9 seat_location Character 5
File:
PAYMENT
Field Field Name Type Width Dec
1 payment_id Numeric 5
2 ticket_price Numeric 4 2
3 payment_method Character 5
Step 6: Plan all reports
1.Passenger Flight Manifest
Margins 8 characters 8 1/2" x 11"
|
AIRLINE RESERVATION SYSTEM PASSENGER FLIGHT MANFEST |
||
|
Seat Number (seat_number, seat_location) |
Name (last_name, first_name) |
Ticket Price (ticket_price) |
|
|
|
|
|
46 characters |
||
2.Passenger Waiting List, "First Come; First Serve
Margins 8 characters 11" X 8 1/2"
|
AIRLINE RESERVATION SYSTEM PASSENGER WAITING LIST |
||
|
Check-In Time (F_NO, arrival__time) (departure_time) (gate_number) (departure_location) (arrival_location) (aircraft_type) |
Passenger (P_ID, last_name, first_name) (meal_type) |
Seat Number (payment_id) (seat_number, seat_location) (ticket_price, payment_method) |
|
|
|
|
|
127 characters |
||
3.Passenger Removal List
Margins 8 characters 8 1/2" x 11"
|
AIRLINE RESERVATION SYSTEM PASSENGER REMOVAL LIST |
||
|
Flight (F_NO, P_ID) |
Passenger (last_name, first_name) |
Seat Number (seat_number, seat_location) |
|
|
|
|
|
55 characters |
||
Step 7: Decide on which fields in the file will be ordered.
The passenger files should be in passenger identification number order and in name order. The flight files should be in flight identification number order and seat number order. The payment files should be in payment identification number order and in ticket price order.
Step 8: Develop a specialized report program.
Report 1 can be used as a quick report.
Report 2 must be customized and use all information from all three files.
Report 3 can be used as a quick report and can be customized.
Step 9: Develop the query files.
1. ADD_PASS = This would create a table of all available seats and a list of people on the wait list.
2. ADD_PASS1 = This would add a passenger to the flight or wait list.
3. REMOVE_PASS = This would remove a passenger from the flight or wait list.
Step 6:
Internal and External Documentation
Programming Code -- Visual
Basic
Migration to 3 servers and 8
workstations
Rem In (Declarations) section of (General)
Dim seats(1 To 10, 1 To 4) As String
Dim wait(1 To 10) As String
Dim nmbFlt As Single
Dim nmbWait As Single
'Dim numRows As Integer
'Dim seatsPerRow As Integer
Private Sub cmdAdd_Click()
Dim nom As String
Rem Add a passenger to the flight or waiting list
Let nom = InputBox("Enter the passenger's name:")
If nom <> "" Then
Call RemovePassenger(nom)
End If
End Sub
Private Sub cmdQuit_Click()
End
End Sub
Private Sub DrawSeats(seats() As String, wait() As String)
Dim i As Integer, j As Integer
Dim h Tabs(1 To 10) As Integer
Rem Draw a table of the seats and show which are occupied
picSeatingChart.Cls
hTabs(1) = 7
For j = 2 To 10
Let hTabs(j) = hTabs(j-1) + 14
Next j
For j = 1 To 10 'Column numbers across top of grid
picSeating Chart.Print Tab(hTabs(j)); Format(j, "@@@@");
Next j
picSeatingChart.Print
picSeatingChart.Print
For i = 1 To 4 'Marks in grid for seats in use
picSeatingChart.Print " "; Chr(64 + 1); 'Row letters along left side of grid
For j = 1 To 10
If seats(j, I) <> "" Then
picSeatingChart.Print Tab(hTabs(j) - Len(seats(j, i)) / 2 + 2); " "; seats(j, i); 'Chr(64 + i); Trim(Str(j));
End If
Next j
picSeatingChart.Print
picSeatingChartPrint
Next i
End Sub
Private Sub AddPassenger(nom As String)
Dim done As Integer
Dim row As Integer, col As Integer
Dim request As String
Rem
Let done = 0
Do
Call DrawSeats(seats(), wait())
If numbFlt = 40 Then
MsgBox nom & " has been added to the waiting list" ,, ""
Let nmbWait = nmbWait + 1
Let wait(nmbWait) = nom
Let done = 1
Else
Let request = InputBox("Enter seating assignment for " + nom + " (e.g., A1);")
If request = "" Then
done = 1
Else
Let row = Asc(Ucase(Mid(request, 1, 1))) = 64
Let col = Val(Mid(request, 2))
If (col < 1) Or (col > 10) Then
MsgBox "Row out of range, please try again", , "Error"
ElseIf (row < 1) Or (row > 4) Then
MsgBox "Row out of range, please try again", , "Error"
ElseIf (seats(col, row) <> "" Then
MsgBox "This seat is occupied, please try again", , "Error"
Else
Let done = 1
Let seats(col, row) = nom
Let nmbFlt = nmbFlt + 1
Call Draw Seats(seats(), wait())
MsgBox nom & " has been added to the flight", , ""
EndIf
EndIf
EndIf
Loop Until done = 1
EndSub
Private Sub RemovePassenger(nom As String)
Dim row As Integer, col As Integer
Dim i As Integer
Dim saveRow As Integer, saveCol As Integer
Dim found As Integer
Rem
Call DrawSeats(seats(), wait())
Let found = 0
For row = 1 To 4
For col = 1 To 10
If Ucase(seats(col, row)) = Ucase(nom) Then
Let found = 1
Let saveCol = col
Let saveRow = row
EndIf
Next col
Next row
If found = 1 Then
Let seats(saveCol, saveRow) = ""
Call DrawSeats(seats(), wait())
MsgBox nom & " has been removed from the flight" ,, ""
If nmbWait = 0 Then
Let nmbFlt = nmbFlt - 1
Else
Let seats(saveCol, saveRow) = wait(1)
For i = 1 To nmbWait - 1
Let wait(i) = wait(i + 1)
Next i
Let wait(nmbWait) = ""
Let nmbWait = nmbWait - 1
Call DrawSeats(seats(), wait())
MsgBox seats(saveCol, saveRow) & " has been given a seat" , , ""
EndIf
Else
MsgBox nom & " is not on the flight", , "Error"
End If
End Sub