software resue tech

12
Illinois Institute of Technology CS441 Project Zornitza Panayotova 1 12/05/02 Project CS 441 fall 2002 Airline Reservation System Created by Zornitza Panayotova CS Department, IIT

Upload: muthaharsk

Post on 06-May-2015

485 views

Category:

Technology


1 download

DESCRIPTION

mca

TRANSCRIPT

Page 1: Software Resue Tech

Illinois Institute of Technology CS441 Project

Zornitza Panayotova 1 12/05/02

Project CS 441 fall 2002

Airline Reservation System

Created by Zornitza PanayotovaCS Department, IIT

Page 2: Software Resue Tech

Illinois Institute of Technology CS441 Project

Zornitza Panayotova 2 12/05/02

Airline Reservation System

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

Page 3: Software Resue Tech

Illinois Institute of Technology CS441 Project

Zornitza Panayotova 3 12/05/02

1. Overview

The Airline reservation system is a Web-based on-line reservation system thatis intended to provide information needed to reserve seat(s) on certain flights.This project is based on the 3-tier architecture. It is a pureJAVA/HTML/JSP/Servlet solution.

2. Project requirements

[ REQ-1] Each flight has a limited number of available seats. There are numberof 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 whereeach 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 valueswithin this table will be hard coded.

[ REQ-3] The Server shall maintain a table for the customers where each rowwithin 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 areservation.

[ 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 [1-5000].

[ 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 clicksthe OK button you will contact the server in order to see if there aresuch flights available in the database, and if there are, then the server

Page 4: Software Resue Tech

Illinois Institute of Technology CS441 Project

Zornitza Panayotova 4 12/05/02

will calculate the fare and send them to the client that will displaythem for the user along with departure/arrival time from/todeparture/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, thena new page will be displayed that will prompt the user to enter thefollowing: Customer Name, Customer Address, Customer Credit CardNumber, 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 returngets back a confirmation number that it will display for the customerand 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 tocancel certain reservation.

[ REQ-15] Once the user enters a confirmation number to cancel the client willsend this confirmation number and the server will delete thisreservation from its customer table.

[ REQ-16] The user shall provide a valid confirmation number in order to cancelcertain reservation and if the user enters an invalid confirmationnumber and error message shall be displayed for the user.

[ REQ-17] To minimize number of flights that are less than half full, we areinterested to display on the main page of our system, special offers forthose flights that meet the conditions specified in the followingrequirement.

[ REQ-18] If there are certain flights that have the following condition: (0.33 flightcapacity < number of reserved seats < 0.5 flight capacity) && ((current date +5 days) = departures date))). Then you need to display ads in the homepage of the airline reservation systems about these flights that arepriced at a discount of %30 of their original price, in order toencourage customers to buy tickets on that flight.

[ REQ-19] The ads in the previous requirement shall not be hard-coded and shallbe selected randomly.

Page 5: Software Resue Tech

Illinois Institute of Technology CS441 Project

Zornitza Panayotova 5 12/05/02

[ REQ-20] Once the user clicks on the ad, it will display the page about that flightand the ability to reserve seats on that flight. In other words there shallbe a reserve button on the displayed page.

3. Design description

3.1 Scheme of the system

index.jsp

SearchResults.jsp

SelectedFlight.jsp

ConfirmPage.jsp

Check

Submit

ReserveCancel

Cancel

CancelReservation.jsp

CancelResult.jsp

Submit

OK Cancel

If “CancelReservation” linkselected

If clicked

If clickedIf clicked

If clicked If clicked

If clicked

If clicked If clicked

If “Ad” linkselected

Legend:

Condition to go to another page

JSP page

Button on a page

Button on JS alert

Page 6: Software Resue Tech

Illinois Institute of Technology CS441 Project

Zornitza Panayotova 6 12/05/02

index.jsp

SearchResults.jsp If no flights found

Page 7: Software Resue Tech

Illinois Institute of Technology CS441 Project

Zornitza Panayotova 7 12/05/02

SearchResults.jsp If flight(s) found

SelectedFlight.jsp

Page 8: Software Resue Tech

Illinois Institute of Technology CS441 Project

Zornitza Panayotova 8 12/05/02

ConfirmPage.jsp

CancelReservation.jsp

Page 9: Software Resue Tech

Illinois Institute of Technology CS441 Project

Zornitza Panayotova 9 12/05/02

CancelResult.jsp If reservation not found

CancelResult.jsp If reservation exists

Page 10: Software Resue Tech

Illinois Institute of Technology CS441 Project

Zornitza Panayotova 10 12/05/02

3.2 Database

For this project I use Micrisoft Access as the DBMS.

Database: Zorry_DatabaseUser name: ZorryPassword: 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

ConfirmationNumber

CustomerID ScheduleID NumberOfPassengers

Discount CreditCardType CreditCardNumber

ExpirationDate

Page 11: Software Resue Tech

Illinois Institute of Technology CS441 Project

Zornitza Panayotova 11 12/05/02

Relationships

4. Testing Examples:

All data in the database are for flights for 12/7/2002 and12/8/2002. If you want to test the system you have to select forDeparture date either 12/7/2002 or 12/8/2002. Thecommercials for discount flights can be seen only if the systemdate 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;

Page 12: Software Resue Tech

Illinois Institute of Technology CS441 Project

Zornitza Panayotova 12 12/05/02

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 onlyif you system date is 12/2/2002 or 12/3/2002. Every time whenyou test it you need to change the system date (see [Req. – 18]).

v Test for Cancel Reservation:- Enter to test Cancel Reservation: 120202ars0084022.