The ListOfPeople Class

The ListOfPeople Class

This class represents a simple linked-list class in C++. It is written as a list of people and was originally used in an elevator simulator. It actually contains two classes: a Person class which holds the ``next'' and ``previous'' pointers for the list, and the ListOfPeople class which holds the head and tail pointers of the list.

To Obtain the Classes

To obtain the ListOfPeople class you need the include file Person.h, the source file Person.C, the include file ListOfPeople.h, and the source file ListOfPeople.C.

Make Sure to Also Include...

Be sure to include the following lines in your source code file, as these routines utilize them.

            #include <stdlib.h>
            #include <math.h>
            #include <stream.h>
            #include <strings.h>
Also, if you wish to use UNIX commands (exevlp, system, sleep, etc.) in your program, you should also have
            #include <unistd.h>

This class is a true linked-list class. It keeps the list elements in the Person class, but controls the list through the ListOfPeople class. Externally this is not visible to the user of the class, but when modifying the class, this fact must be taken into consideration.

This class was generated for a class at UC Davis and has been successfully only in a limited situation. It is given for example. You may use it ``as is'' or can modify it. If you find errors, and can correct them, please send mail to the address below, as we would also like to know about them.

This document maintained by Ken Joy.
Comments to the author :

All contents copyright (c) 1998
Computer Science Department, University of California, Davis
All rights reserved.

Ken Joy
Wed Jan 7 14:58:22 PST 1998