home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / cset21v1.zip / IBMCPP / TUTORIAL / ICLCC / TUTOR2 / INSTRUCT.TXT < prev    next >
Text File  |  1993-04-23  |  1KB  |  24 lines

  1. Tutorial 2: Adding, removing and replacing elements.
  2.             Changing the type of the list from an ordinary
  3.             SEQUENCE to an EQUALITY SEQUENCE.
  4.             Defining an list type SET.
  5.             You want to manage collections of people.
  6.  
  7. 1) Based on the list from tutorial 1 (which is a SEQUENCE) change the
  8.    list from an ordinary SEQUENCE to the (default) EQUALITY SEQUENCE.
  9.    Which header-files must now be included and what is now the typedef
  10.    statement to define your collection of Person?
  11. 2) Add your name to the list.
  12. 3) Remove  T. Wappler from the list.
  13.    Remember you have changed the sequence so that removing is possible.
  14.    What additional operator has to be provided by the class Person?
  15. 4) Write a typedef statement to define your set of Person.
  16.    Which file do you have to include?
  17.    Which default implementation are you using?
  18. 5) Create a set of people and add "Joe Cool" and "Mr. Nobody" to this set.
  19.    What function has  to be provided for the class Person?
  20. 6) Replace "Joe Cool" by "MR. Somebody" in the Set.
  21. 7) Add "Mr. Somebody" to the Set.
  22.  
  23. Have a look at the results with your debugger.
  24.