CSC 148 - Announcements and Advice about Assignment 5
University of Toronto - Fall 2000
Department of Computer Science
CSC 148H - INTRODUCTION TO COMPUTER SCIENCE
Announcements and Advice about Assignment 5
-
The comment on one of the existing methods is slightly inaccurate.
Build says: "Make me contain all the integers in st."
It should say "Make me contain the first n integers in st."
-
Question:
Are we allowed to use helper methods?
Answer:
Absolutely.
You should use helper methods if they:
- break down tasks into more logical divisions;
- help with recursion
(For example, this is why
the public toString method in the starter code uses a helper.
Make sure that you understand this.); or
- perform a task that is repeated in other method(s).
Be sure to document your helper methods carefully, and maintain information
hiding principles.
-
Question:
Do we HAVE TO use recursion to write the methods?
Answer:
Yes. Every method that you are to write must have recursion in it, or
in a helper method that it calls.
-
Question:
I was wondering if anyone knew, for Ass 5, whether it woud be okay to
flip the keys in the nodes, or do we have to flip the nodes themselves?
Answer:
The method specification tells you to flip the node's "left and right
child" - this is not accomplished by merely swapping the keys within
the child nodes.