Project 4


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.


Documents

Component Specification Files

Because of the large number, these files are not listed separately here, but can be found in the "starters" directory in the project4 directory, following the link below or downloading directly from the file server. These files define the modules and their interfaces. The comments provide details on what each module and function does.

Behavior Samples

The following sample behavior files illustrate the program behavior and contain all of the different output message text strings produced by the program. 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.tx file redirected to cin, your program's cout redirected to a file should match the out.txt file exactly.

The following sample illustrates the behavior of the program when "status" is used after almost every "go" command, with no "show" commands. Your program should reproduce the output file exactly.

The following sample illustrates the behavior of the program when "show" is used after many of the "go" commands, using the same sequence of ship commands as in the first sample. However, some type-ahead is also used. Your program should reproduce the output file exactly. If your program reproduces "status" but not this sample, it indicates that your Ship positions and behavior is correct (for the sample), but your View output is not correct, or your code isn't doing type-ahead properly,

The following sample shows the behavior and errors messages produced by the view-controlling commands, and also illustrates the type-ahead behavior of the program. Your program should reproduce the output file exactly.

The following sample shows most of the error messages produced by the program (a couple are included in the first sample and the remainder in the view-controlling sample). Some type-ahead is also used. Your program should reproduce the output file exactly.

These samples demonstrate the program behavior and are supposed to contain every possible type of output message. It is 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 outputs are a saved copy of a console (shell) 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.

Other Information

At the top level of 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.