ok I see what you mean so that function takes care of all the seat assignment, definitely much more efficient than mine I have to admit...Now, what's with all those flags then?
As I said
3) not quite clear with this:
if takenFlag = 2 OR takenFlag = 4
display boarding pass
else if takenFlag = 2
// this means, you asked economic, but wasn't any left
if the flag is equal to 2 means that you have assigned a seat in economic class, but then you say that if takenFlag =2 there are no seats in economic?
Same story when takenFlag is equal to 3: that variable is set to 3 just after the user has chosen 2nd class so how do I relate that to the fact that there are no seats available in second class?
I don't quite understand the way they are used to flag whether the seats are assigned or not