[Bluej-discuss] Code Pad: is it working correctly?

Barry Brown barry at cs.sierracollege.edu
Wed Apr 19 18:04:12 BST 2006


On Apr 19, 2006, at 7:25 AM, Poul Henriksen wrote:
>
> As Philippe correctly writes you have to drag the object onto the  
> object
> bench. In the above example you would have to write the following line
> instead:
>   new Circle()
>
> That will return a new circle object represented by a little red icon,
> which you can drag onto the object bench. When you drop it on the  
> object
> bench you give it a name which can be used in the code pad.

I'm sorry. I don't see the little red icon. As far as I can tell,  
nothing has changed in the window at all except the Code Pad now has  
a line that says "new Circle();" in it.

Oooohhh. I just figured it out! If I type in the statement WITHOUT  
the semicolon, I get the icon that I can drag onto the bench. WITH  
the semicolon, no icon.

That will be very confusing to the students.

>
> If you create a test class and right click it you will see two menu  
> items:
> 1. Object Bench to Test Fixture: this will store the objects currently
> on the object bench into the test class.
> 2. Test Fixture to Object Bench: this will restore any object to the
> object bench which have been stored in the test class.
>

I tried out that technique using the Shapes project, but couldn't  
make it work. I'll have to play with it some more.

But, since unit testing isn't introduced until chapter 6, is there  
something that can be used from day one that will allow them to  
record their actions so they can replay them over and over, much like  
a macro in Excel?

-B


More information about the bluej-discuss mailing list