Programming Assignment 2


Data Structures

Fall Semester 1997

Due: by 8:00 AM, October 1, 1997

Your Task


from Laboratory Exercise 4 in Roberge. These exercises require you to implement an array-based list class and test it against a test program designed by Roberge.

This assignment begins a our exploration of data structures with the List ADT, which you will implement and use in several different ways this semester. This week, you will use the array-based collection implementation with which you are becoming quite familiar. (Logbook, PointList, and Stradt are all array-based collections.) Later we will explore an alternate approach, pointer-based implementations. The List ADT also gives you another chance to implement and work with an internal iterator.

There is one new piece of C++ knowledge that we will use this week, the idea of a template class. Consider our collection classes to date: A log book held a collection of daily entries; a point list held a collection of points; and a string held a collection of characters. A template allows a collection class to hold items of any other class, specified at the time that the instance is created. You may want to review this example of a template class.

Source Files

In order to do your implementation, you will need to download the following source files from Roberge:


Your implementation file, listarr.C, must begin with a header block that includes the file name, your name as author, and the creation and modification history of the file. You may use this file as a template.

Submit to your instructor, by the due time and date, the following:

Eugene Wallingford ==== ==== October 2, 1997