| < Day Day Up > |
|
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.
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.
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 > |
|