//  Data Structures with Java by John R. Hubbard
//  Copyright McGraw-Hill, 2001
//  Example 3.9 on page 62
//  A test driver for the ArraySequence subclass

public class Ex0309
{ public static void main(String[] args)
  { ArraySequence s = new ArraySequence();
    System.out.println("s = " + s);
    s.append("Chile");
    s.append("China");
    s.append("Congo");
    s.append("Egypt");
    s.append("China");
    s.append("India");
    s.append("Italy");
    s.append("China");
    System.out.println("s = " + s);
    System.out.println("s.getLength() = " + s.getLength());
    System.out.println("s.count(\"China\") = " + s.count("China"));
    System.out.println("s.get(5) = " + s.get(5));
    System.out.println("s.indexOf(\"China\") = "
                      + s.indexOf("China"));
    System.out.println("s.remove(5) = " + s.remove(5));
    System.out.println("s.remove(\"China\") = " + s.remove("China"));
    System.out.println("s.indexOf(\"China\") = "
                      + s.indexOf("China"));
    System.out.println("s.set(2,\"Japan\") = " + s.set(2,"Japan"));
    System.out.println("s = " + s);
    System.out.println("s.getLength() = " + s.getLength());
  }
}