[Santa Clara University]
Department of Mathematics
and Computer Science

Machine Problem 10

Math 10 -- Fall, 2001
D. C. Smolarski, S.J.

                  
35 points
DUE: NOON: Monday, November 26, 2001
NO Extensions!

Using program MP10A (as seen in class) as the basis for your code, write one C++ program with several procedures/functions that will do the following:

  1. generate a binary tree with 31 nodes,
  2. print out the tree with its 90 degree counter-clockwise rotation,
  3. print out the nodes of the tree in preorder.
  4. print out the nodes of the tree in inorder,
  5. print out the nodes of the tree in postorder,
You can copy program MP10A from my subdirectory on pascal--it is stored as file mp10a.cxx (also available at this link).

As usual, turn in both the program code (properly commented) and the output.

As usual, use good programming style, and turn in both the program (source file) and the output file. As usual, you may develop this program either on the departmental Linux server or on a PC, but what you turn in must have been run on the Linux server.


This page is maintained by Dennis C. Smolarski, S.J., dsmolarski@math.scu.edu. Last changed: 30 September 2001.