/*&nbsp* To change this license header, choose License Headers

/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */package EddieExamples;import java.awt.Container;import java.awt.FlowLayout;import java.awt.event.ActionEvent;import java.awt.event.ActionListener;import javax.swing.JButton;//import javax.swing.JFrame;import javax.swing.JTextField;import javax.swing.JApplet;import javax.swing.JOptionPane;/** * * @author Ramon */public class Assign7ex extends JApplet implements ActionListener {    boolean econfull = false;    boolean firstfull = false;    boolean[] seats;    //    JButton firstBtn;    JButton econBtn;    JTextField input;    boolean isFirst = false;    int seated = 0;               @Override   public void init(){  // sets up window for display – JLabel and JTextField        for (int t = 0; t == 11; t++) {            seats[t] = false;        }            // sets up container window      Container c = getContentPane();      c.setLayout( new FlowLayout() );           // adds JLabel      firstBtn = new JButton();      firstBtn.setText(‘First Class’);      add(firstBtn);      firstBtn.addActionListener(this);           econBtn = new JButton();      econBtn.setText(‘Economy’);      add(econBtn);      econBtn.addActionListener(this);           // adds JTextField and connects it to actionListener      input = new JTextField(25);      add(input);   }    @Override    public void actionPerformed(ActionEvent e) {    Assign7ex assigner = new Assign7ex();        if (e.getSource() == firstBtn) {            input.setText(‘1st button clicked’);            isFirst = true;            seated = reserve(isFirst);  // ERROR HAPPENS HERE            System.out.println(‘I am here!’);            switch (seated) {            case 1: case 2: case 3: case 4: case 5:                input.setText(‘Boarding Pass: Seat ‘ + seated + ‘ First Class’);                break;            case 6: case 7: case 8: case 9: case 10:                input.setText(‘Boarding Pass: Seat ‘ + seated + ‘ Economy Class’);                break;        }    } else if (e.getSource() == econBtn) {            input.setText(‘2nd button clicked’);            isFirst = false;            System.out.println(‘I am big!’);            assigner.seated = assigner.reserve(isFirst); // ERROR HAPPENS HERE    }    //seated = reserve(isFirst);        switch (seated) {            case 1: case 2: case 3: case 4: case 5:                input.setText(‘Boarding Pass: Seat ‘ + seated + ‘ First Class’);                break;            case 6: case 7: case 8: case 9: case 10:                input.setText(‘Boarding Pass: Seat ‘ + seated + ‘ Economy Class’);                break;        }        if (econfull == true && firstfull == true) {            seated = -2;        }    System.out.println(‘Airplane is Full! – Thank you for playing Airplane Seating!’);    }     public int reserve(boolean isFirstClass) {               boolean done = false;        int seat = 0;               if (econfull == true && firstfull == true) {            return -2;        }        if (isFirstClass == true && firstfull != true) {            for (int i = 1; i <= 5; i++) {                if (done == false && seats[i] == false) {                    seats[i] = true;                    done = true;                    seat = i;                    return seat;                }            }            if (done == false) {                firstfull = true;                if (econfull == false) {                String n = JOptionPane.showInputDialog(null,                            ‘Are you OK with Economy Class? (click OK or cancel)’,                            ‘Change of Class’, 3);                if (n != null) {                        System.out.println(‘Hello OK’);                    }                } else {                        System.out.println(‘Hello CANCEL’);                        }                }        } else if (econfull != true && isFirstClass == false) {            done = false;            for (int i = 6; i <= 10; i++) {                if (done == false && seats[i] == false) {                    seats[i] = true;                    done = true;                    seat = i;                    return seat;                }            }            if (done == false) {                econfull = true;                if (firstfull == false) {                String n = JOptionPane.showInputDialog(null,                            ‘Are you OK with First Class? (click OK or cancel)’,                            ‘Change of Class’, 3);                if (n != null) {                        System.out.println(‘Hello OK’);                    }                } else {                        System.out.println(‘Hello CANCEL’);                        }                }        }return -2;}}

You can hire someone to answer this question! Yes, essay96.com has paper writers dedicated to completing research and summaries, critical thinking tasks, essays, coursework, and other homework tasks. It's fast and safe.