Quote Originally Posted by IfYouSaySo
I don't know exactly what the solution is, but I don't think it's as easy as some here are leading us to believe.
Or, you're thinking about it too much. We don't know whether this is a class assignment or a prototype for American Airlines. My experience has taught me to break a problem down and begin to solve pieces of it. As you do, and design an algorithm, you'll discover more problems that will shape your overall design. Hopefully my suggestions can act as the platform to solve the problem.