Presentation is loading. Please wait.

Presentation is loading. Please wait.

Online Airline Reservation System -- Detailed design Pingping Ma Oct 19, 2006.

Similar presentations


Presentation on theme: "Online Airline Reservation System -- Detailed design Pingping Ma Oct 19, 2006."— Presentation transcript:

1 Online Airline Reservation System -- Detailed design Pingping Ma Oct 19, 2006

2 Overview Database design Database design Activity diagram Activity diagram Class interface Class interface Fault tolerant issues Fault tolerant issues

3 Database design There are mainly 5 entities involved: There are mainly 5 entities involved: Flight info. Flight info. Customer info Customer info Reservation Reservation Purchase Purchase Creditcard info. Creditcard info. Please see the entity diagram in the next slides Please see the entity diagram in the next slides

4 Database design diagram

5 Activity Diagram

6 Major class interface Authenticate Authenticate Search Search CreditCard CreditCard FlightInfo FlightInfo ReservationInfo ReservationInfo

7 Authenticate Interface Variable username, password, email Variable username, password, email Boolean Authenticate (String username, String password); Boolean Authenticate (String username, String password); This method checks if the user name and password input is a valid input. This method checks if the user name and password input is a valid input. If true, it will return true; otherwise, return false. If true, it will return true; otherwise, return false. Boolean Register (String username, String password, String email) Boolean Register (String username, String password, String email) This method is used to register a new user. This method is used to register a new user. If the register is successful, return true; otherwise, return false. If the register is successful, return true; otherwise, return false. Boolean IsAlive (String username) Boolean IsAlive (String username) This method checks to see if the user is still active when it doesn’t reponse in a certain amount of time. This method checks to see if the user is still active when it doesn’t reponse in a certain amount of time.

8 Flight Interface A class about the flight information with the following variables A class about the flight information with the following variables FlightId FlightId From_City From_City To_City To_City Dept_Time Dept_Time Arr_Time Arr_Time Num_Of_Seats Num_Of_Seats Price Price

9 Search Interface This class has only one method Search. Maybe can be combined with the Flight class. This class has only one method Search. Maybe can be combined with the Flight class. Flight Search_oneway (String from_city, String to_city, Date dept_time, Date arr_time, int num_of_Seat) Flight Search_oneway (String from_city, String to_city, Date dept_time, Date arr_time, int num_of_Seat) Flight Search_round (String from_city, String to_city, Date dept_time, Date return_time, int num_of_Seat) Flight Search_round (String from_city, String to_city, Date dept_time, Date return_time, int num_of_Seat) Given the search criteria, searches the database looking for flights that match the criteria. Given the search criteria, searches the database looking for flights that match the criteria.

10 Creditcard Interface A class about the credit card information A class about the credit card information Variables Variables User_id User_id Card_number Card_number Type Type Year Year Month Month Methods Methods Boolean IsValid() Boolean IsValid() String GetNumber() String GetNumber() String GetType() String GetType() Number GetYear() Number GetYear() Number GetMonth() Number GetMonth()

11 Reservation Info A class about the reservation information. A class about the reservation information. Variables Variables Reservation_id Reservation_id User_id User_id Flight Flight Credit_card Credit_card Reservation_date Reservation_date Num_of_seats Num_of_seats Passenger_name: an String array Passenger_name: an String array

12 ReserveAndPurchase Method Methods Methods Boolean Reserve(String Reservation_id, String User_id, Flight flightobj, Creditcard cc, Date Reservation_date, Integer Num_of_seats, String [] Passenger_name) Boolean Reserve(String Reservation_id, String User_id, Flight flightobj, Creditcard cc, Date Reservation_date, Integer Num_of_seats, String [] Passenger_name) Boolean CancelReservation () Boolean CancelReservation () Reservation ReadReservation() Reservation ReadReservation() Boolean Purchase() Boolean Purchase() If the action is successful, return True; otherwise, return False. If the action is successful, return True; otherwise, return False.

13 Fault Tolerant issues A failure in any transaction step causes the whole transaction to be lost. A failure in any transaction step causes the whole transaction to be lost. Possible Solution: two phase commit procotol can be used. Or make full use of the COMMIT, ROLLBACK command in the database. Possible Solution: two phase commit procotol can be used. Or make full use of the COMMIT, ROLLBACK command in the database. How to identify a client or server failure? How to identify a client or server failure? Implement an IsAlive function which ping the client or server to make sure that it is still active. Implement an IsAlive function which ping the client or server to make sure that it is still active.

14 Fault tolerant issues Synchronization Synchronization Use monitor method in the Reserve method to make sure there is no client reserving the same ticket at the same time Use monitor method in the Reserve method to make sure there is no client reserving the same ticket at the same time Data replication Data replication Use data replication techniques to improve the reliability of the system. Use data replication techniques to improve the reliability of the system. Use primary copy method to enhance the consistency of the data. Use primary copy method to enhance the consistency of the data.


Download ppt "Online Airline Reservation System -- Detailed design Pingping Ma Oct 19, 2006."

Similar presentations


Ads by Google