In this project, you will implement two classes:
A skeleton header files for these classes is provided with the associated class. You may modify these files for the project, though you must add your own comments. Do not copy text from the specifications. Testing tools for some of the classes provided in the associated testing directory. Included is a simple exception header file which contains two classes, underflow and overflow which are thrown by some of the member functions.
Failure to satisfy the stated run times will result in a mark of 0.
You are required to submit within your gzipped tar file the following header files:
Be sure to read the instructions on the Projects page with regard to the submission of projects.
The commands is:
$ tar -cvf uwuserid_p2.tar Resizable_deque.h $ gzip uwuserid_p2.tar
Be sure to read the instructions on the Projects page with regard to the submission of projects.
The run time of each member function is specified in parentheses at the end of the description. In some cases, the run-time requirements are expressed as amoritized run-time requirements.
You are expected to comment your code. At least 20% of your source code must be in the form of valid and informative comments. As you will use this class in future projects, it is advisable to comment it appropriately. You are also expected to comment the provided bare header files.
One test file is provided, however, it is by no means a complete.
In this case, there are multiple boundary conditions: when the list empties, when the array is 1/4 full, when it is empty, and when the array is full. Each function should be tested with function class which cause it to manipulate both an empty lists and arrays and non-empty list and arrays.
Look at each function which has an if statement. Try to create a sequence of instructions which cause the conditional statent to evaluate to true. Next, do the same thing, however, create a sequence of instructions which will cause the conditional to evaluate to false.
What are other possible scenerios which could cause your classes to fail?
Rather than immediately starting with the *Driver.cpp program, it is probably a lot easier to write a small int main() function which you can build up. Each time you implement a function, add a function which tests it.
A smaller routine like this would allow you to make full and effective use of the debugger: you can easily track what is occuring. Notice how I test some of the functions, but not all, based on the order in which I would implement them.
Have you: