See the assignment turn-in page (last modified on 16 October 2007) for instructions on turning in your assignment.
The absolute deadline for turning-in Assignment 3 is Friday, 12 December at 6:00 p.m.. It is not possible to turn-in Assignment 3 after the absolute deadline.
Samba is an anamation system that reads drawing commands from std-in, executes them, and displays the result in a window.
The file samba.txt
in the assignment directory /export/home/class/cs-305-503/a3
contains the Samba documentation. The Samba executable samba
is in the
same directory. The tar file samba.tar.bz2
in the same directory contains
the source for Samba (and Polka, on which Samba is built) if you want to build
Samba locally. There is a
version of Samba
that runs on Microsoft systems, but it’s old (1997 vintage).
Select one of the tree algorithms or problems described in the text, implement
it, and annotate it with print statements that produce an animation of the
implementation’s execution when run through Samba. E-mail me
(rclayton@monmouth.edu
) your choice of algorithm so I can make sure there
are no duplicates; algorithm selection is first-come, first-serve.
To keep things simple, your program should generate problem instances internally without need for any input. For example, a depth-first search program would generate a tree and randomly select the target node.
For your convenience, there is some tree-generating code in the assignment
directory; see the file gen-tree.h
for details. The program
draw-tree.cc
in the same directory is a simple example of using
gen-tree()
and generating Samba commands.
Your program should write to std-out Samba commands that animate its execution on the generated problem instance.
This page last modified on 10 December 2008. |