I need to implement this random number generator for firstClassBooking() and economyClassBooking(), for an airline seat booking program, where seats from first class (seats 1 -5) and econ class (seats 6-10) are randomly assigned. Econ Class works perfectly except for no random, first class is broken af cause Im trying to implement rng generator. My too main errors is that the code just stops if it hits a random number again (If seat 2 is picked first, and it chooses seat 2 again). I need to basically add a validator to re-ask the user what he wants to book (go back to top of loop). My other problem is that it might fill 4/5 or 3/5 seats and just claim that the array is full and no more seats are available.
Thanks for help:)