LINKED LIST LAB*
Copy the Linked List program
Add a reverse function.
List::reverse() that reverses the
links in a list so that the elements in the list occur in the opposite order.
reverse() function.
Add a size function.
List::get_size() that computes the
number of elements in the list by counting the elements until the end of
the list is reached.
size field to the List class.
Modify the push_back(), insert() and
erase() functions to update the size field
so that it always contains the correct size.
Add a member function get_size_quickly() that takes advantage
of this data field.
get_size() and
get_size_quickly() functions.
Print out and hand in copies of all three files:
Also send e-mail to your lab TA and include these files as an attachment.
If you have extra time, you can start work on the final programming project. The design for this project is due next week at the beginning of lab; the implementation is due at the beginning of class on Friday of tenth week.
*This lab is based on Programming Exercises P13.2, P13.4, and P13.5, from Computing Concepts with C++ Essentials by Cay Horstman, John Wiley & Sons, Inc., 1999.