/*************************************************************************

 IBM(R) VisualAge(TM) C++ for OS/2(R), Version 3
  - Collection Class Library -

 (C) Copyright IBM Corp. 1991, 1995.
  - Licensed Material - Program-Property of IBM - All Rights Reserved.

 *************************************************************************/

Tutorial 3: usage of a cursor,
locating and accessing elements, and the use of iterators.

You want to manage collections of people with additional info.
The name is the search criteria for locating these people.

1) Modify the file sperson3.h to for the person record to contain
   the  telephone number ( as a string).
2) Add a key function, that returns a reference
   to the name of a person.
3) In the file example3.C, add the include and typedef statement
   for a keyset of keyPerson.
   What is the advantage of using a keyed structure?
ANSWER: Only the key is compared while searching, this is more efficient
than comparing the whole data structure.
   Why is a list implementation not optimal for locating elements?
ANSWER: A list is searched in sequential order.
Sorted structures stuctures make use of the ordering relation.
4) Overload the << operator for the new collection,
   to print out the contents of the collection
   in the form
      name : <the name> TelephoneNr. : <telephone number>
   Use the cursor iteration.
5) Print the collection using the << operator.
6) Use the allElementsDo method print all telephone numbers.
7) Locate "F. Seliger" in the set and print out his telephone number.
8) Remove all non-us phone numbers from this collection
   ( nonUS numbers start with xxx).
9) Print out all entries of the collection.

Have a look at the results with your debugger.
Have a look at the output and compare it to the example3.xpc file.
