Listing 27 Illustrates a set of Persons

// tset2.cpp
#include <iostream.h>
#include "set2.h"
#include "person3.h"

main()
{
   Set<Person> s;
   Person p1("Waller","Fats",Date(10,10,1910),"N/A");
   Person p2("Domino","Fats",Date(1,1,1947),"123-45-6789");

   s.insert(p1);
   s.insert(p2);
   cout << s << endl << endl;

   s.remove(p2);
   cout << s << endl;
   cout << "s"
       << (s.contains(p2) ? "does" : "does not")
       <<" contain p2" << endl;
   return 0;
}

/* Output:
{{Waller,Fats,[October 10. 1910],N/A}
{Domino,Fats,[January 1, 1947],123-45-6789}
}

{{Waller,Fats,[October 10, 1910],N/A}
}
s does not contain p2
*/

// End of File