Example Solution:
Binary Search Trees - BST Implementation; Adventure Game
(Console version)
- Which version of C#/ Visual Studio is required for this assignment?
-
The provided files are (obviously) C#, and (less obviously:) ) they were built using
the Visual Studio 2005 product. If you have an older version of Visual Studio (or
are using Mono), you probaby won't be able to open the Solution (.SLN) file. If
this is the case, in order to build this, you'll need to add all the .CS files to
a new project, and then everything should compile & run just fine.
- Other than the System.Console classes, this program uses no other
classes, so this *should* be good to go on VS 2003, and Mono ; it hasn't been tested
on those systems, though.
- Console Application / Test Harness
- Feel free to omit these, and make the students do more of the
assignment, if you want to.
- Tree-centric vs. node-centric implementation
- Note: the XNA
version demonstrates how to implement a tree with most of the logic in the
BST
nodes, while the example solution for the console version demonstrates how
to create a binary search tree with most of the logic in the BST
class itself. If you're particularly interested in one approach or
the other, you can examine the various implementations as you want.