This site requires JavaScript, please enable it in your browser!
Greenfoot back
cakemk@gmail.com
cakemk@gmail.com wrote ...

2011/10/16

Greenfoot versus BlueJ

cakemk@gmail.com cakemk@gmail.com

2011/10/16

#
Hi, I teach OO programming in the first year Bachelor of Applied Computer Science. Before this year we used BlueJ to introduce OO, this year we tried Greenfoot. I like Greenfoot, but there are two features I really miss: BlueJ's Object Bench and JUnit. I find the object bench very useful during the first few weeks. It gives students the opportunity to write simple classes from scratch (without extending Actor), to create objects and execute methods on them. In Greenfoot you can only show the state of non-Actor classes. I can't find a way to execute methods on them. Is there any chance BlueJ's object bench could be integrated in Greenfoot? Same question about JUnit: are there any plans to integrate it in Greenfoot?
nccb nccb

2011/10/17

#
Hi, The object bench is effectively replaced by the world. Once you have an actor in the world, you can call methods on them in the same way as you can on objects in the object bench in BlueJ. The trade-off is that while you have to extend Actor, you can make the methods have more obvious effects (moving the actor in the world, or rotating or changing image) which can make the results a bit more obvious. So my advice if you want to use Greenfoot is to make your first classes Actors, but that way you get to call methods on them. I don't think we have any plans to add the object bench to Greenfoot. Similarly, in Greenfoot the way to test is usually more informal (but more immediate), by calling methods on the actors directly and observing the results. So there's not as much need for JUnit in Greenfoot because bugs are usually more apparent by playing the scenario. (and hence we don't currently plan to add JUnit). One technique that Michael Kölling has used in the past is to use both Greenfoot and BlueJ. Since they have the same editor, it's not out of the question to use both environments, and that way -- if you want -- you can use the object bench for starters, then switch to Greenfoot (or vice versa), and use the best of both environments.
You need to login to post a reply.