Thursday, April 26, 2007

HW2 FAQ (round 2)

------------------------------------------------------------------------------
This is an automatic message sent to all CS-10 students, Spring 2007
------------------------------------------------------------------------------

Greetings,

There are not many questions in this email, but I think it's worth a spam.

QUESTION: Do we need to use recursion in Part B (Pascal.java)?
ANSWER:
No, you don't need to use recursion for Pascal. You can use it, but it is not encouraged. The solution code uses some for-loops and arrays. Please refer to Dr Jacobson's email for his hint on Pascal. I also copied his hints and posted it online:
http://cs10s07.blogspot.com/2007/04/dr-jacobsons-hints-on-pascal.html
Note that your program needs to run very fast even for 50 rows of the triangle.

QUESTION: Are there some sample runs for Robot.java?
ANSWER:
Yes, Dr Jacobson sent it out some time back. I posted it online on my blog:
http://cs10s07.blogspot.com/2007/04/robot-sample-run.html
It would be great if you can try to match the output. If not, it will be hard for me to grade. But I'm not allowed to take points off on that, though. However, my eyes may get dizzy and there could be some errors in grading, which will cause you some hassles of having to come to my office hours and fight for your points back ;)
(I won't intentionally do that, of course.)
One reminder: don't forget to check for the negative values, and that small < med < large

QUESTION: Are there some sample runs for Pascal.java?
ANSWER:
Yes, they are here.
http://cs10s07.blogspot.com/2007/04/pascal-sample-run.html
Again, please try to match the output. Please just print out the triangle and no extra messages. Do not forget to check the input and keep asking until the user enters the right values.

Best,
- Mock

No comments: