This scenario is explained from the beginning in the greenfoot book:
http://www.amazon.com/Introduction-Programming-Greenfoot-Object-Oriented-Simulations/dp/0136037534
And there are many people who just post scenarios from that book on this site, and I always wonder why.
2012/7/21
2012/7/22
2012/7/22