Project 5


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 files to avoid line-ending problems.


Component Specification Files

Use the following p5_main.cpp file as-is in your project.

p5_main.cpp

The "strings.txt" file is a text file containing the character string constants that were used in the instructor's solution to generate the output message text. You can avoid typing errors by downloading this file and then copy-pasting these into your program.

strings.txt

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 (see the strings.txt file). The "_console.txt" 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.

Samples with the same name as in Project 4 have the same sequence of commands as in Project 4, except where the new view commands are involved.

The "noshow" versions are the same sequence of inputs, but without the "show" commands. You can these to check your program before you implement the Views.

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 following sample illustrates the states and update behavior when two Soldiers attack a single Peasant, showing how one of the Soldiers reports being in the state of attacking a dead target. Notice how the dead Peasant disappears immediately from the system.

The following samples shows the checking and error reporting involved with creating new objects with valid names.

The following sample illustrates the new features of the program along with new output messages. Different views and an Archer are demonstrated.

The following sample illustrates the behavior of the program just with regard to the Views, and contains a variety of messages, both normal and error messages.

The following sample illustrates the behavior of the program when two Soldiers fight, while an Archer is simply present, and contains a variety of messages, both normal and error messages. Note how dead Agents disappear from the system at a different time than in Project 4.

The following sample illustrates the behavior of the program when two Peasants cooperate to move food to a far-off Town_Hall. Unfortunately, a Soldier interrupts the work. Afterwards, new Structures and Agents are created. An Archer is present but doesn't do anything. This contains a variety of messages, both normal and error messages. Note how dead Agents disappear from the system at a different time than in Project 4.

These samples demonstrate the program behavior and are supposed to contain every possible type of output message. They 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.