import Tables.*;

class TestTable {

  public static void displayCity(City c) {
    System.out.println(c.getKey());
  }  // end displayCity
  
  // Main entry point
  public static void main(String[] args) {
    TableInterface<City, String> chart = 
                        new TableBSTBased<City, String>();
    City c;

    c = new City("Narragansett", "USA", 12000);
    chart.tableInsert(c);
    c = new City("Ocracoke", "USA", 3000);
    chart.tableInsert(c);

    // If a table iterator class called TableIteratorBST
    // is available for the class TableBSTBased (as created
    // in Programming Problem 2, you can also do the 
    // following:
    //TableIteratorBST<City> iter = new TableIteratorBST<City>(chart);
    //while (iter.hasNext()) {
    //  displayCity(iter.next());
    //} // end while

  } // end main
} // end TestTable
