title: Making an Airline Reservation class and need help on how to make a Demo class to call the methods
body: <p>So I have made this class that is booking seat for passengers and i have written all the methods</p>
  
  <pre><code>public class AirlineBooking
  {
      String[]seatArray;
      public AirlineBooking()
      {
          seatArray = new String[10];
          for(int i =0;i&lt;seatArray.length; i++)
          {
              seatArray[i] = "x";
          }
      }
      public void passengerList()
      {
          for(int i =0;i&lt;seatArray.length; i++)
          {
              System.out.println("Seat "+i+" -- "+ seatArray[i]);
          }
          System.out.println("---");
      }
      public void reserve(String name, int seat)
      {
          if(seatArray[seat].equals("x"))
          {
              seatArray[seat]= name;
          }
          else
          {
              System.out.println("Choose another seat");
          }
      }
      public void availableVacantSeats()
      {
          for(int i=0; i&lt;seatArray.length; i++)
          {
              if(seatArray[i].equals("x"))
              {
                  System.out.println("Seat " + (i+1)+ " = "+ seatArray[i]);
              }
          }
      }
      public void cancelReservation(String passengerName, int seat)
      {
          if(seatArray.equals(seatArray[seat]))
          {
              seatArray[seat]="x";
          }
  
      }
      public void coupleSeats()
      {
          for(int i=0;i&lt;9;i++)
          {
              if(seatArray[i].equals("X")&amp;&amp;seatArray[i+1].equals("X"))
              {
                  System.out.println("Seat "+i+" and "+(i+1));
  
              }
          }
      }
  
  
  }
  </code></pre>
  
  <p>This seems to work fine but I cannot remember how to create a Class that calls these methods. So far I have </p>
  
  <pre><code>public class AirlineDemo
  {
  
      Airline new Airline= myAirline
  
      public static void main(String[]args)
      {
  
  
          myAirline.passengerList();
  
      }
  
  
  }
  </code></pre>
  
  <p>but it is not working at all. Help would be very appreciated. </p>