I am having trouble getting started with my program. I have writen the array but I am having trouble starting the if statemnent to fill the seats in the program. If they press 1 it needs to fill seats 1 through 5 if they press 2 it needs to fill seats 6 through 9. it cannot fill the same seat twice and if one section is filled it needs to go to the next. Any help would be appreciated.

public class
{
    final static int QUIT = 3
    static Scanner console = new Scanner(System.in);
    public static void main(String[] args)
    {
        boolean[] seats = new Boolean[10];

        seats[0] = false;
        seats[1] = false;
        seats[2] = false;
        seats[3] = false;
        seats[4] = false;
        seats[5] = false;
        seats[6] = false;
        seats[7] = false;
        seats[8] = false;
        seats[9] = false;

        int firstClass;
        int economy;
        int seating;

        System.out.println("If you would like first class press 1, if you would like economy press 2 or press 3 to 
        quit.");
        seating = console.nextInt();

        while(!QUIT)
        {
            if

Try writing down the logic in simple english before trying to do it in Java. Imagine you are explaining to someone else how the allocation should be done if it was a manual/paper system.
This will help you get the logic clear in your own head, after which the Java will be easy.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.