This website is preserved for historical and scholarly reference and is no longer actively maintained.

Assignment #1

Due Friday, January 29 at 8:00 a.m..

Individual programming assignments will be accepted up to two calendar days after the program was due. There will be penalty points deducted as follows.

***** IMPORTANT *****
To use the code from the Weiss text (2nd Edition) you may:
Alternative methods of avoiding problems with templates will be explained in class.

***** ASSIGNMENT *****

Write a copy constructor for the linked list implementation of a stack given in the Weiss text.

You will need a printStack function that is part of your user program. You will use the printStack function to test whether or not the copy constructor works. The printStack function must not invoke the copy constructor and must not result in the destruction of the stack it is printing.

Your user program should perform the following tests to determine whether or not the copy constructor is working correctly: Using the handin command, turn in your user program, Stack.h, and Stack.cpp. Programs that do not compile will receive very little credit.

Return to Eleanor Hare's home page.

Return to Department of Computer Science Home page.