CS441
Project
Project
Zornitza Panayotova
12/05/02
CS441
Project
1. Overview ..................................................................................................................... 3 2. Project Requirements ................................................................................................ 3 3. Design Description .................................................................................................... 5 3.1 Scheme of the System ................................................................................. 5 3.2 Database ..................................................................................................... 10 3. Testing Examples ..................................................................................................... 11
Zornitza Panayotova
12/05/02
CS441
Project
1. Overview
The Airline reservation system is a Web-based on-line reservation system that is intended to provide information needed to reserve seat(s) on certain flights. This project is based on the 3-tier architecture. It is a pure JAVA/HTML/JSP/Servlet solution.
2. Project requirements
[ REQ-1] Each flight has a limited number of available seats. There are number of flights that go from/to different cities at different dates and time. [ REQ-2] The server shall maintain a table for the list of available flights where each row within the table has the following fields: Flight number, Departure city, Destination City, Departure date, Departure time, Arrival date, Arrival Time, Capacity, and Available seats. The values within this table will be hard coded. [ REQ-3] The Server shall maintain a table for the customers where each row within the table has the following fields: Confirmation number, Customer Name, Customer Address, and Departure Flight Number. The values within this table will be created when the user makes a reservation. [ REQ-4] The confirmation number is a string that is composed of the date (mmddyy), time, flight number, and a random number in the range [15000]. [ REQ-5] Assume the customers are interested always in one-way trip [ REQ-6] Have at least 50 flights in your database. [ REQ-7] For the user interface, You have to give an option for departure city [ REQ-8] For the user interface, You have to give an option for arrival city [ REQ-9] For the user interface, You have to give an option for departure date [ REQ-10] For the user interface, You have to give an option for departure time [ REQ-11] Once the user makes the selection for departure/arrival city and clicks the OK button you will contact the server in order to see if there are such flights available in the database, and if there are, then the server Zornitza Panayotova 3 12/05/02
CS441
Project
will calculate the fare and send them to the client that will display them for the user along with departure/arrival time from/to departure/destination cities. Within this page, you will have 2 buttons: Reserve or Cancel. [ REQ-12] If the user selects the reserve button of the previous requirement, then a new page will be displayed that will prompt the user to enter the following: Customer Name, Customer Address, Customer Credit Card Number, and a Submit Button. [ REQ-13] Once the user selects the Submit button of the previous requirement, then the client will send the information to the server and in return gets back a confirmation number that it will display for the customer and provide an OK button in order to return to the home page. [ REQ-14] The user should be provided with a panel that will allow the user to cancel certain reservation. [ REQ-15] Once the user enters a confirmation number to cancel the client will send this confirmation number and the server will delete this reservation from its customer table. [ REQ-16] The user shall provide a valid confirmation number in order to cancel certain reservation and if the user enters an invalid confirmation number and error message shall be displayed for the user. [ REQ-17] To minimize number of flights that are less than half full, we are interested to display on the main page of our system, special offers for those flights that meet the conditions specified in the following requirement. [ REQ-18] If there are certain flights that have the following condition: (0.33 flight capacity < number of reserved seats < 0.5 flight capacity) && ((current date + 5 days) = departures date))). Then you need to display ads in the home page of the airline reservation systems about these flights that are priced at a discount of %30 of their original price, in order to encourage customers to buy tickets on that flight. [ REQ-19] The ads in the previous requirement shall not be hard-coded and shall be selected randomly.
Zornitza Panayotova
12/05/02
CS441
Project
[ REQ-20] Once the user clicks on the ad, it will display the page about that flight and the ability to reserve seats on that flight. In other words there shall be a reserve button on the displayed page.
index.jsp
If clicked
Check
SearchResults.jsp
If clicked If clicked
If Ad link selected
CancelReservation.jsp
Cancel Submit
If clicked
Submit
SelectedFlight.jsp
If clicked If clicked
If clicked OK
If clicked Cancel
Cancel Reserve
CancelResult.jsp
Legend:
JSP page Button on a page Button on JS alert Condition to go to another page
ConfirmPage.jsp
Zornitza Panayotova
12/05/02
CS441
Project
index.jsp
SearchResults.jsp
If no flights found
Zornitza Panayotova
12/05/02
Project
SearchResults.jsp
SelectedFlight.jsp
Zornitza Panayotova
12/05/02
CS441
Project
ConfirmPage.jsp
CancelReservation.jsp
Zornitza Panayotova
12/05/02
CS441
Project
CancelResult.jsp
CancelResult.jsp
If reservation exists
Zornitza Panayotova
12/05/02
CS441
Project
3.2
Database
For this project I use Micrisoft Access as the DBMS. Database: Zorry_Database User name: Zorry Password: Zorry
Table Flight
FlightNumber DepartureCity DestinationCity Price Capacity
Table Schedule
ScheduleID FlightNumber DepartureDateTime ArrivalDateTime AvailableSeats
Table Customer
CustomerID CustomerFirstName CustomerLastName Address City State ZipCodePhoneNumber
Table Reservation
Confirmation CustomerID ScheduleID NumberOf Discount CreditCardType CreditCard ExpirationDate Number Passengers Number
Zornitza Panayotova
10
12/05/02
CS441
Project
Relationships
4. Testing Examples: All data in the database are for flights for 12/7/2002 and 12/8/2002. If you want to test the system you have to select for Departure date either 12/7/2002 or 12/8/2002. The commercials for discount flights can be seen only if the system date is 12/2/2002 or 12/3/2002.
v Test for no flights found: - Chicago to San Francisco for any date; - any flight with date other than 12/7/2002 and 12/8/2002;
Zornitza Panayotova
11
12/05/02
CS441
Project
v Test for flights in the morning, noon, afternoon or evening: - New York to Chicago on 12/7/2002 or 12/8/2002; - Miami to Chicago on 12/7/2002 and 12/8/2002; v Test for Discount flights: - Because all data are for departure dates: 12/7/2002 or 12/8/2002 you can see the randomly selected commercials only if you system date is 12/2/2002 or 12/3/2002. Every time when you test it you need to change the system date (see [Req. 18]). v Test for Cancel Reservation: - Enter to test Cancel Reservation: 120202ars0084022.
Zornitza Panayotova
12
12/05/02