Summary of Collection Use

The first step in designing a data model is to declare the CPerson class. Each CPerson object represents the name and phone number of an individual person. Next, use one of the Microsoft Foundation Class Library's list classes to derive a custom list class to hold a collection of CPerson objects and to search for a person matching a specified last name.

To customize the list class, you derive from CObList and add new functions as necessary to add new functionality. For the most part, however, you can rely on the inherited functionality of the Microsoft Foundation list class, including the ability to serialize the collection and all its elements with a single statement.