/** This class coordinates the seating for all performances. */
public class ShowSeatingSystem {
  /** an array that holds the seating for all performances */
  private Seating[][] perfs; //performances for all days of all months.
  
  /** Construct a ShowSeatingSystem initializing the system for
   *  all performances.
   */
  public ShowSeatingSystem() {
    perfs = new Seating [ShowCalendar.MONTHS.length] [];
    for (int m = 0; m < ShowCalendar.MONTHS.length; m++) {
      perfs[m] = new Seating[ShowCalendar.DATES[m]];
    }
    
    for (int i = 0; i < perfs.length; i ++) {
      for (int j = 0; j < perfs[i].length; j++) {
        perfs [i][j] = new Seating();
      }
    }
  }
  /** Inquire if n seats are available on a date specified by the
   *  month and the date.  Note that the month and date numbering 
   *  starts with 1.
   *  @param n the number of seats required.
   *  @param month the month of the preferred performance.
   *  @param date the date of the month of the preferred performance.
   */
  public String findSeats(int num, int mon, int day) {
    mon--;
    day--;
    if (mon < 0 || day < 0 || mon >= perfs.length || day >= perfs[mon].length) {
      return "invalid date please enter the number of seats then the month then the date as an integer.";
    }
    return perfs[mon][day].findSeats(num);
  }
      
  
  /** Sell a seat for a specific performance.
   *  @param the month of the preferred performance.
   *  @param date the date of the month of the preferred performance.
   *  @param r the row that the requested seat is in.
   *  @param s the seat in the row that is requested.
   */
  
}