Skip to main content
Me fail English? That's unpossible!
Source Link

The main feedback is going to be that you aren't delivering in the right way. You only needed to create methods that could be used by a reservation system internally. You don't need to create the whole reservation system.

You should start with defining a PlanePlane as being this thing that "has" some seatsseats:

class Plane {
    int[][] seats = new int[12][4];
}

Then, fillSeatsRandomly sounds like they want you to write an operation on that works on some particular Plane that can update the status of the existingits seats.

class Plane {
    int[][] seats = new int[12][4];

    public void fillSeatsRandomly() {
        for ( int row = 0; row < seats.length ; row ++ ) {
            // ...
        }
    }
}

And so on. Think about it as though your Prof. is going to take your code and write main for themselves. Though you can, and probably should, write your own main function to demonstrate your understanding. Just don't prompt the user. Instead, have it do hard-coded things using the randomized plane.

class Plane {
    int[][] seats = new int[12][4];

    public void fillSeatsRandomly() {
        for ( int row = 0; row < seats.length; row ++ ) {
            // ...
        }
    }

    public boolean isSeatAvailable(int row, char column) {
        // ...
        // return (... == 0);
    }

    // ...

    public static void main(String[] args) {
        Plane p = new Plane();
        p.fillSeatsRandomly();
        p.displaySeats();
        if (p.isSeatAvailable(4, 'C')) {
            p.reserveSeat(4, 'C');
        }
        // ...
    }
}

I've dropped the word static from all but main. Do you understand why that is? If not, refresh yourself.

The main feedback is going to be that you aren't delivering in the right way. You only needed to create methods that could be used by a reservation system internally. You don't need to create the whole reservation system.

You should start with defining a Plane as being this thing that "has" some seats:

class Plane {
    int[][] seats = new int[12][4];
}

Then, fillSeatsRandomly sounds like they want you an operation on that Plane that can update the status of the existing seats.

class Plane {
    int[][] seats = new int[12][4];

    public void fillSeatsRandomly() {
        for ( int row = 0; row < seats.length ; row ++ ) {
            // ...
        }
    }
}

And so on. Think about it as though your Prof. is going to take your code and write main for themselves. Though you can, and probably should, write your own main function to demonstrate your understanding. Just don't prompt the user. Instead, have it do hard-coded things using the randomized plane.

class Plane {
    int[][] seats = new int[12][4];

    public void fillSeatsRandomly() {
        for ( int row = 0; row < seats.length; row ++ ) {
            // ...
        }
    }

    public boolean isSeatAvailable(int row, char column) {
        // ...
        // return (... == 0);
    }

    // ...

    public static void main(String[] args) {
        Plane p = new Plane();
        p.fillSeatsRandomly();
        p.displaySeats();
        if (p.isSeatAvailable(4, 'C')) {
            p.reserveSeat(4, 'C');
        }
        // ...
    }
}

I've dropped the word static from all but main. Do you understand why that is? If not, refresh yourself.

The main feedback is going to be that you aren't delivering in the right way. You only needed to create methods that could be used by a reservation system internally. You don't need to create the whole reservation system.

You should start with defining a Plane as being this thing that "has" some seats:

class Plane {
    int[][] seats = new int[12][4];
}

Then, fillSeatsRandomly sounds like they want you to write an operation that works on some particular Plane that can update the status of its seats.

class Plane {
    int[][] seats = new int[12][4];

    public void fillSeatsRandomly() {
        for ( int row = 0; row < seats.length ; row ++ ) {
            // ...
        }
    }
}

And so on. Think about it as though your Prof. is going to take your code and write main for themselves. Though you can, and probably should, write your own main function to demonstrate your understanding. Just don't prompt the user. Instead, have it do hard-coded things using the randomized plane.

class Plane {
    int[][] seats = new int[12][4];

    public void fillSeatsRandomly() {
        for ( int row = 0; row < seats.length; row ++ ) {
            // ...
        }
    }

    public boolean isSeatAvailable(int row, char column) {
        // ...
        // return (... == 0);
    }

    // ...

    public static void main(String[] args) {
        Plane p = new Plane();
        p.fillSeatsRandomly();
        p.displaySeats();
        if (p.isSeatAvailable(4, 'C')) {
            p.reserveSeat(4, 'C');
        }
        // ...
    }
}

I've dropped the word static from all but main. Do you understand why that is? If not, refresh yourself.

added 4 characters in body
Source Link

The main feedback is going to be that you aren't delivering in the right way. You only needed to create methods that could be used by a reservation system internally. You don't need to create the whole reservation system.

You should start with defining a Plane as being this thing that "has" some seats:

class Plane {
    int[][] seats = new int[12][4];
}

Then, fillSeatsRandomly sounds like they want you an operation on that Plane that can update the status of the existing seats.

class Plane {
    int[][] seats = new int[12][4];

    public void fillSeatsRandomly() {
        for ( int row = 0; row < seats.length ; row ++ ) {
            // ...
        }
    }
}

And so on. Think about it as though your Prof. is going to take your code and write main for themselves. Though you can, and probably should, write your own main function to demonstrate your understanding. Just don't prompt the user. Instead, have it do hard-coded things using the randomized plane.

class Plane {
    int[][] seats = new int[12][4];

    public void fillSeatsRandomly() {
        for ( int row = 0; row < seats.length; row ++ ) {
            // ...
        }
    }

    public boolean isSeatAvailable(int row, char column) {
        // ...
        // return (... == 0);
    }

    // ...

    public static void main(StringString[] args) {
        Plane p = new Plane();
        p.fillSeatsRandomly();
        p.displaySeats();
        if (p.isSeatAvailable(4, 'C')) {
            p.reserveSeat(4, 'C');
        }
        // ...
    }
}

I've dropped the word static from all but main. Do you understand why that is? If not, refresh yourself.

The main feedback is going to be that you aren't delivering in the right way. You only needed to create methods that could be used by a reservation system internally. You don't need to create the whole reservation system.

You should start with defining a Plane as being this thing that "has" some seats:

class Plane {
    int[][] seats = new int[12][4];
}

Then, fillSeatsRandomly sounds like they want you an operation on that Plane that can update the status of the existing seats.

class Plane {
    int[][] seats = new int[12][4];

    public void fillSeatsRandomly() {
        for ( int row = 0; row < seats.length ; row ++ ) {
            // ...
        }
    }
}

And so on. Think about it as though your Prof. is going to take your code and write main for themselves. Though you can, and probably should, write your own main function to demonstrate your understanding. Just don't prompt the user. Instead, have it do hard-coded things using the randomized plane.

class Plane {
    int[][] seats = new int[12][4];

    public void fillSeatsRandomly() {
        for ( int row = 0; row < seats.length; row ++ ) {
            // ...
        }
    }

    public boolean isSeatAvailable(int row, char column) {
        // ...
        // return (... == 0);
    }

    // ...

    public static void main(String args) {
        Plane p = new Plane();
        p.fillSeatsRandomly();
        p.displaySeats();
        if (p.isSeatAvailable(4, 'C')) {
            reserveSeat(4, 'C');
        }
        // ...
    }
}

I've dropped the word static from all but main. Do you understand why that is? If not, refresh yourself.

The main feedback is going to be that you aren't delivering in the right way. You only needed to create methods that could be used by a reservation system internally. You don't need to create the whole reservation system.

You should start with defining a Plane as being this thing that "has" some seats:

class Plane {
    int[][] seats = new int[12][4];
}

Then, fillSeatsRandomly sounds like they want you an operation on that Plane that can update the status of the existing seats.

class Plane {
    int[][] seats = new int[12][4];

    public void fillSeatsRandomly() {
        for ( int row = 0; row < seats.length ; row ++ ) {
            // ...
        }
    }
}

And so on. Think about it as though your Prof. is going to take your code and write main for themselves. Though you can, and probably should, write your own main function to demonstrate your understanding. Just don't prompt the user. Instead, have it do hard-coded things using the randomized plane.

class Plane {
    int[][] seats = new int[12][4];

    public void fillSeatsRandomly() {
        for ( int row = 0; row < seats.length; row ++ ) {
            // ...
        }
    }

    public boolean isSeatAvailable(int row, char column) {
        // ...
        // return (... == 0);
    }

    // ...

    public static void main(String[] args) {
        Plane p = new Plane();
        p.fillSeatsRandomly();
        p.displaySeats();
        if (p.isSeatAvailable(4, 'C')) {
            p.reserveSeat(4, 'C');
        }
        // ...
    }
}

I've dropped the word static from all but main. Do you understand why that is? If not, refresh yourself.

Source Link

The main feedback is going to be that you aren't delivering in the right way. You only needed to create methods that could be used by a reservation system internally. You don't need to create the whole reservation system.

You should start with defining a Plane as being this thing that "has" some seats:

class Plane {
    int[][] seats = new int[12][4];
}

Then, fillSeatsRandomly sounds like they want you an operation on that Plane that can update the status of the existing seats.

class Plane {
    int[][] seats = new int[12][4];

    public void fillSeatsRandomly() {
        for ( int row = 0; row < seats.length ; row ++ ) {
            // ...
        }
    }
}

And so on. Think about it as though your Prof. is going to take your code and write main for themselves. Though you can, and probably should, write your own main function to demonstrate your understanding. Just don't prompt the user. Instead, have it do hard-coded things using the randomized plane.

class Plane {
    int[][] seats = new int[12][4];

    public void fillSeatsRandomly() {
        for ( int row = 0; row < seats.length; row ++ ) {
            // ...
        }
    }

    public boolean isSeatAvailable(int row, char column) {
        // ...
        // return (... == 0);
    }

    // ...

    public static void main(String args) {
        Plane p = new Plane();
        p.fillSeatsRandomly();
        p.displaySeats();
        if (p.isSeatAvailable(4, 'C')) {
            reserveSeat(4, 'C');
        }
        // ...
    }
}

I've dropped the word static from all but main. Do you understand why that is? If not, refresh yourself.