This discussion is archived
3 Replies Latest reply: Nov 12, 2012 6:10 AM by shreevat RSS

Logic for airline reservation system

shreevat Pro
Currently Being Moderated
Hello All,

I was just wondering what is the psuedo logic behind airline reservation system. I had done the assignment long back (10 years back), so cannot recollect the details. All I remember is - we use set of arraylists (for seats) and set the seats accordingly (mark as occupied if reserved, else show as available etc). My biggest question now is - if a person requires 4 seats (preferably all adjacent seats, complexity is all 4 seats in a row is also considered to be adjacent, so as 3 in a row and once behind, so as 2 in a row, one behind, one diagonally opposite etc, so many possible combination). I don't recollect these kind of enhancements done when I designed. I am just curious to know how these systems are designed. Can someone throw your ideas on the reservation system pseudo logic please? Also which technology is generally preferred for such systems (Java, PHP etc)?

Thanks in advance
Shree
  • 1. Re: Logic for airline reservation system
    973635 Newbie
    Currently Being Moderated
    shreevat wrote:
    Hello All,

    I was just wondering what is the psuedo logic behind airline reservation system.
    I'm sure each airline has its own. You'd have to ask them. That question has nothing to do with Java.
    All I remember is - we use set of arraylists (for seats)
    That's implementation details, not "pseudo-logic."
    My biggest question now is - if a person requires 4 seats (preferably all adjacent seats, complexity is all 4 seats in a row is also considered to be adjacent, so as 3 in a row and once behind, so as 2 in a row, one behind, one diagonally opposite etc, so many possible combination). I don't recollect these kind of enhancements done when I designed.
    I doubt anybody here knows what you did either.
    I am just curious to know how these systems are designed. Can someone throw your ideas on the reservation system pseudo logic please?
    Rather than try to get people to do your work for you under the ham-handed guise of "just curious," why not take your best shot, post your thoughts, and ask specific questions about the parts that give you trouble?
    Also which technology is generally preferred for such systems (Java, PHP etc)?
    There is no generally preferred technology for airline reservation systems. I'm sure some use Java and some use PHP and some use C++ and some use COBOL or who knows what and all of them use a combination of technologies.
  • 2. Re: Logic for airline reservation system
    939520 Explorer
    Currently Being Moderated
    I don't know how reservation systems are designed. I'm sure it much more complex than you may realize (handling concurrent transactions, etc).
    However, here are some ideas to get you started:

    Create the following classes:

    Reservation class
    AirLines class
    Airline class
    Airplanes class
    Airplane class
    Seats class
    Seat class

    A Reservation class handles reservations (functions) and has an Airlines class (because one reservation with stop overs may span more than one airline)
    An Airlines class has one or more Airline classes
    An Airline class has a name (examples: Delta or USAirways). It also has an Airplanes class
    An Airplanes class has one or more Airplane Classes
    An Airplane class has one Seats class. An Airplane class knows if the plane is in-service or not (out due to maintenance), and its flight schedule.
    A Seats class has one or more Seat classes. The Seats class knows the positions of all seats relative to each other and weather a given seat at a given position is first class, exit seat, etc.
    A Seat class stores within it if the seat is reserved and the seat number (example: 3D).

    Now it is your responsiblity to determine which class has responsiblity for which service (function). For example, you ask the Airplane class if its in-service, not the Airline.
    Note I would rather create an Airplanes class that wraps an arraylist of Airplane classes rather than a raw arrayList of Airplane clases because the Airplanes class can expose functions you create that aren't in an arraylist, and you can avoid implementing other functions of an arraylist that you don't want exposed. If you want more ideas on reservations, visit a company's website such as USAirways and go through the process of booking a flight (but DO NOT actually finish booking a flight since they will charge you money!).
  • 3. Re: Logic for airline reservation system
    shreevat Pro
    Currently Being Moderated
    Thanks guys for the response. Please note that this is not part of any assignment/project I am working for, so I didn't give my thoughts as I am not sure what is the best design. I was just curious to know the high level logic. I am working on implementation/enhancements/prersonalization on Oracle E-Business Suites, so was curious about outside world systems, that's all.

    Thanks
    Shree

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points