public class Or2main{
/* USES Class   OrderedSetOfInts:
 The menu of  OrderedSetOfInts is:
  public boolean isMember(int element)
  public void    addElement(int element)
  public void    deleteElement(int element)
  public void    union( OrderedSetOfInts A)
  public void    intersect( OrderedSetOfInts A)
  public void    print()
  public int     getElement(int i)
  public  OrderedSetOfInts(int capacity)
 ...
******/
  public static void main(String[] args){
    OrderedSetOfInts A = new OrderedSetOfInts(15);
    A.addElement(6);    A.addElement(2);    A.addElement(4);
    System.out.print("elements of A: "); A.print();
    OrderedSetOfInts B = new OrderedSetOfInts(5);
    B.addElement(16);    B.addElement(4);    B.addElement(2);
    System.out.print("elements of B:  "); B.print();
    OrderedSetOfInts C = new OrderedSetOfInts(5);
    C.addElement(16);    C.addElement(4);    C.addElement(12);
    System.out.print("elements of C:  "); C.print();

    A.union(B); 
    System.out.print("elements of A union with B: "); A.print();

    B.intersect(C); 
    System.out.print("elements of B intersect with C:  "); B.print();

    System.out.print("elements of C:  "); C.print();

    A.deleteElement(100); A.deleteElement(4);
    System.out.print("elements of A: "); A.print();
  }
}
/* THE OUTPUT IS:
elements of A: { 2, 4, 6 }
elements of B:  { 2, 4, 16 }
elements of C:  { 4, 12, 16 }
elements of A union with B: { 2, 4, 6, 16 }
elements of B intersect with C:  { 4, 16 }
elements of C:  { 4, 12, 16 }
elements of A: { 2, 6, 16 } */


