Suggested Projects

 < Day Day Up > 



  1. Modify RobotRat: Building upon the code resulting from the RobotRat project in chapter 16, implement the orthodox canonical class form for RobotRat objects. Do not forget to take into consideration the proper handling of the entire inheritance hierarchy. Write a driver program to test your code.

  2. Binary Tree: Write a program the implements a binary tree. Each node of the binary tree should point to an object that can compare itself to other objects. The actual type of objects stored in the binary tree should be of no concern to the tree, so long as the actual types of objects inserted into the tree know how to compare themselves to other objects.

  3. Object Sorting: Write a program that implements the sorting algorithm of your choice. The sort program will sort generic objects. Create a class of objects that can be sorted and test your program. Hint: An abstract class might publish a Sortable interface. Extend the orthodox canonical class form to implement the required sorting behavior. (i.e., less-than, greater-than, or equality check)



 < Day Day Up > 



C++ for Artists. The Art, Philosophy, and Science of Object-Oriented Programming
C++ For Artists: The Art, Philosophy, And Science Of Object-Oriented Programming
ISBN: 1932504028
EAN: 2147483647
Year: 2003
Pages: 340
Authors: Rick Miller

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net