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
Wrap
Text File
|
1993-04-23
|
894b
|
19 lines
Tutorial 1: Getting started instantiating a Collection Class and calling
a method within the specified collection class.
You want to manage a list of people.
The type of your list shall be an ordinary SEQUENCE.
1) Read and understand the given String class in tstring.h.
Have a look at the chapter "Flat Collections" in the "Library Overview".
2) Write a class Person using the given String class.
For this example, a person only has a name.
3) Write a typedef statement to define your collection of Person.
Which file do you have to include?
ANSWER: iseq.h
Which default implementation are you using?
ANSWER: A linked list is the default implementation for a sequence.
4) Define an object of the created class in the main program.
5) Have a look at the chapter SEQUENCE which contains all methods which
can be called.