home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / cset21v1.zip / IBMCPP / TUTORIAL / ICLCC / TUTOR1 / SOLUTION / SOLUTION.TXT < prev   
Text File  |  1993-04-23  |  894b  |  19 lines

  1. Tutorial 1: Getting started instantiating a Collection Class and calling
  2.             a method within the specified collection class.
  3.             You want to manage a list of people.
  4.             The type of your list shall be an ordinary SEQUENCE.
  5.  
  6. 1) Read and understand the given String class in tstring.h.
  7.    Have a look at the chapter "Flat Collections" in the "Library Overview".
  8. 2) Write a class Person using the given String class.
  9.    For this example, a person only has a name.
  10. 3) Write a typedef statement to define your collection of Person.
  11.    Which file do you have to include?
  12. ANSWER:    iseq.h
  13.    Which default implementation are you using?
  14. ANSWER: A linked list is the default implementation for a sequence.
  15. 4) Define an object of the created class in the main program.
  16. 5) Have a look at the chapter SEQUENCE which contains all methods which
  17.    can be called.
  18.  
  19.