2.2 How to Write the DMTEST Program

This section gives an overview of the steps in writing the DMTEST program. As you work through the steps, you will learn what files to prepare, where to put the code in them, and how to compile the program.

To write the DMTEST program with the Microsoft Foundation Classes:

1.Design the CPerson data object.

Derive the CPerson data class from the Microsoft Foundation Class CObject. Figure 2.2 shows the class hierarchy for CPerson. For more about this step, see “Design the CPerson Data Object” on page 22.

2.Design the CPersonList object.

Derive the CPersonList object from the Microsoft Foundation Class CObList. Figure 2.2 shows the class hierarchy for CPersonList. For more about this step, see “Design the CPersonList Object” on page 36.

3.Test the data model.

Write a small test program to demonstrate the capabilities of the data model. For more about this step, see “Test the Data Model” on page 49.

4.Build the program.

Compile and link the data model test program. For more about this step, see “Build the Program” on page 65.