Doubly Linked List | |
Assigned: Weds May 14, 2003 | Due: Fri May 23, 2003 |
Grade: 80 points |
The "new" concepts covered in this program are:
|
In this program, you are charged to create a doubly
linked list data type.
Part A Implement a doubly linked list for integers. You are provided with:
You need to implement all the member functions in the list header (in IntList.cpp) and test them using the main() program that I have provided. Part B Implement a generic doubly linked list. You are provided with:
The task here is to turn your integer list into a generic template that can be used for any data type. Once you have accomplished this, you can test your implementation with my main() test driver. There is a restriction with our compiler that all template functions be included in the header file. You will want to cut and paste your implementation file after the definition of the DoublyLinkedList template class. Implementation Of course, this program exercises your (new) knowledge of templates and linekd lists. These topics are discussed in Chapters 15 and 16, respectively, in our text. More specifically, the really meaty/relevant sections in the book are:
|
Your program will be graded on three areas: design, quality, and function. Their description and weighting in your grade is given below. 1. Program Design (25%) It is essential to design your program before pounding it out in front of Visual C++. The design for this program requires:
You should include all the class interface files in your main() and be able to compile, but not build (or link) because your class member functions are not yet written. 2. Program quality (25%) I'm working on a more comprehensive style guide, but here's what I will be looking for:
3. Program function (50%) If your program doesn't compile or link, your grade for this section will automatically be cut in half and then I'll start from there. Please leave a README file in your prog01 folder with notes you want me to read. Good luck. |
May 14, 2003 Changed some names to simplify things, and I dropped the addition operator. I posted the following on the k: drive:
I still need to add "remove" tests to the prog04a driver. Part B driver is coming soon! May 19, 2003 The test driver for Part B is available in the Common Area:
On part B, it is a requirement of the Visual C++ compiler that all the functions of a template class be in the same file as the class definition. This means that you do not want a separate DoublyLinkedList.cpp. Put your function implementations at the end of the header file DoublyLinkedList.h. May 21, 2003 Please note that our compiler requires all the functions of a template class to reside in the header along with the definitions. So, for part B, the definition and the implementation of member functions should reside in DoublyLinkedList.h.
|