The project documents will be added to this page as they become available. If you get a page that says "not yet available," it should become available in the future. Ask about it only if we announced that it was supposed to be available.
Note:Files listed as "pdf" can be viewed or downloaded and printed
at high-quality with Adobe's Acrobat Reader.
Files listed as text are plain ASCII text files. The should display in your
browser with correct formatting, but can also be downloaded from the course
file server; downloading with an ftp utility set to ASCII text mode is recommended for code and sample
files to avoid line-ending problems.
Component Specification Files
The header files below should be downloaded and used in your project as-is, without modification. These define the modules and their interfaces. The
comments provide details on what each module and function does. The source files named with "skeleton" provide code that your project must use, but you will add your own code to complete the file. See the comments for instructions.
- Ordered_list_demo.cpp (text) Shows many of the features of the Ordered_list template.
- String_demo1.cpp (text) Illustrates some String capabilities and allocation in action.
- String_demo2.cpp (text) Demonstrates exceptions from String functions.
- String_demo3.cpp (text) Demonstrates String operations as revealed by the monitoring facilities.
- String_demo4.cpp (text) Using a Thing class that contains a String member variable,
demonstrates how the compiler-supplied copy and move functions for Thing automatically use the String's copy and move.
This is revealed by String's monitoring facilities.
- Ordered_list_exception_safety_demo.cpp (text)
Demonstrates exception safety in Ordered_list using a "time bomb" Thing class that blows up during construction, and outputs construction
and destruction messages as well. This allows us to see how the basic and strong exception guarantees are provided when we try to add
Things to the container, or make copies of the container when Thing's constructor can fail.
- Ordered_list_String_exception_safety_demo.cpp (text)
This is a combination of String_demo4 and the above exception-safety demo. The "time bomb" Things now contain a String member variable,
and thanks to String's monitoring messages, we can see how the Strings in the Things are automatically cleaned up as part of Ordered_list's
Simple programs like the above are what you should use as a "test harness" to test your components separately and systematically. However, these are demos - not complete tests.
The following sample behavior files illustrate the program behavior and contain
all of the different output message text strings produced by the program (see the strings.txt file). Your program should match these samples exactly so that you can be sure it is producing all of the different kinds of messages correctly. However, these samples are not a complete test of your program. Your program will be tested for a large number of other possible inputs and input sequences. The console interaction files are a capture of the console display during the program run. The _in.txt and _out.txt files are for you to use with redirected I/O. When given the _in.txt file, your program's stdout output should match the _out.txt file exactly. The other output files are written during the by the program, and your program should produce files that match exactly with these samples.
The following sample illustrates the "normal" behavior of the program and contains the corresponding messages. Your program should reproduce the output files exactly.
The following sample shows the error messages produced by the program and the "rollback" from a failed restore. Your program should reproduce the output file exactly.
The following sample illustrates the behavior of the program when you input excess whitespace and use "type-ahead." Your program should reproduce the stdout and the output files exactly.
These samples demonstrate the program behavior and are supposed to contain every possible type of output message string so that you can prevent your autograder score from being affected by spelling errors and typos.
These samples are not a complete test of your program!!! Your program will be tested for a large number of other possible inputs and input sequences. You must devise your own complete test set to find the bugs in your code.
The console outputs are a saved copy of a
console window after entering the commands by hand. The stdin input file is suitable for redirecting input, and the stdout output can be compared with the redirected output of your program. Your program should match the stdout output.
See the course web page for how to compare files and redirect I/O. In the examples directory on the file server you can find the redirect_io module that you can use to redirect I/O from a C program on
any platform. You can use this to help test your program's output against the supplied samples. The instructions are in the header file.
Autograder submission and responses
It is a good idea to test your components as you develop them (see the project document). You can get an autograder evaluation
of the components before you have finished the entire project. To do this, submit ALL of the required project files, even if they are empty.
The autograder will build and test whatever parts of the program that it can. Many of the component tests will fail to compile
unless your p2_globals module is correct and your Utility has at least the specified contents, so create them first.