University of Toronto - Fall 2000
Department of Computer Science

Assignment 2 Announcements

Monday 2, October: wording for part one

Question:
In the assignment handout for part one, it says "use the same wording that has been used in the comments for the definition of the method." What if I paraphrased it but said the same basic thing; Is that ok?
Answer:
No. You need to follow the assignment instructions. We intend for you to use the same wording as much as possible.

Friday 29, September: main:6?

Question:
Why do the pictures of the memory model have main:6 on them? I thought the starting picture was for the 4th statement in the main method, so shouldn't it be main:4?
Answer:
The diagrams given to you in the original assignment handout had an error. All three diagrams should have main:4 in the frame for the main method. This error has now been fixed.

Thursday 28, September: Is it okay to not cheat?

Question:
I find that when I cheat and store my Strings in a box like I do for primitive types, I don't have much room in the method frame to draw the String. Is it okay if I don't cheat and instead show my String objects in the Object Space, where they really should be?
Answer:
Yes, this is fine. You can show them either way for full credit on this assignment.

Thursday 28, September: Can I use Pencil?

Question:
Can I do this assignment in pencil?
Answer:
We would prefer if you do it in pen. If you use pencil and there is a error made in the marking of your assignment, neither your TA nor your instructor will consider your assignment for remarking.

Wednesday 27, September: Modelling output

Question:
Do we need to represent the System.out PrintStream object in our memory model diagram?
Answer:
No, this is not required for this assignment. In fact, since you have been told that you are not to make modifications to the Static Space for A2, it would be impossible to model output.

Tuesday 26, September: When to draw update B?

Question:
For update B, what do you mean when you ask us to draw the picture, "after statement 2 of the addStock() method finishes executing?" I thought that since statement 2 is the last statement in the addStock() method, the method frame for addStock() would disappear after statement 2 finishes executing.
Answer:
For update B, you should draw your picture after statement 2 in the addStock() method finishes executing, but before the addStock() method frame is erased from the Method Stack.

Monday 25, September: By Hand?

Question:
My handwriting is messy. For part one, is it okay if I type my comments into the Shapes.java file, and then print it out?
Answer:
No. We really mean for you to write your comments by hand using a pen on your printout of the Shapes.java file. This will make it easier for your TA to mark your assignment.

Monday 25, September: double

Question:
I don't understand the return type of 'double' in the volume method of the Cylinder class.
Answer:
Double is a primitive type in Java that allows you to store numbers that have a decimal point (floating point numbers). We have not covered the double type in lectures yet, but you do not need to understand it in order to be able to complete A2.