CS 105 (C++)

Assignment 4: Dynamically Allocated Stack

I. Overview

In this assignment, you will implement a dynamically allocated stack.

Your stack will be driven by commands from an input file, and when finished, your program will write the final stack to an output file.

The following are some important details of how your program must be implemented.
Note: In this assignment you will be allocating and deallocating memory by hand.  Design and implement your code carefully to ensure that this is done correctly.  (Despite years of experience in this area, I still literally draw pictures of the memory management whenever I have to implement this kind of code.)  During grading, I will test your memory handling using a program called "valgrind" as described in Section II below.  You should run the same test yourself before submitting your work.

II. Grading

Note: In light of the importance of memory management and the danger of getting it wrong, improper allocation and deallocation will be counted in the (Provisional) Dealbreakers section of this assignment's grading.

III. The More You Know

The following are some additional items that may be very important for you to know about this assignment.

Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.