assignment | Programming Education Blog Skip to primary content Skip to secondary content Programming Education Blog Michael Kölling on BlueJ, Greenfoot, Stride, and other Programming Education Topics Search Main menu Home New Joy of Code Stride Joy of Code Docs I Object Who is Michael? Tag Archives: assignment JoC #16: Adding a score counter Posted on February 12, 2012 by Michael Kolling 22 Habe Mut, dich deines eigenen Verstandes zu bedienen. — Immanuel Kant Welcome back after a little break in putting out new episodes. I was at a conference for a week or so (Melbourne, other side of the world!), and then I had to get settled into my time zone again, but I’m back! I still feel a little jet-lagged, so if my voice sounds even more drab than usual in this episode – I blame the time zones. This episode deals with an incredibly important concept: object interaction. (It could actually also have been titled “Object interaction – a second look”.) We started to look at object interaction a little bit in Episode #15, and now we’re really getting stuck in. We’re throwing around terms like “object references” and “constructors”. Yes, we’re slowly cranking up to a more professional level here. So sit back, switch your brain on, and watch. And of course — as always — after watching: Fire up Greenfoot, and get coding yourself! Download video Oh, and one more thing: I am showing how to implement a score counter here, because several people have asked me how to do that. So if you have a question, or something you want explained: tell me in the comments, and I’ll try to fit it in in one of the future episodes. Update: This episode shows how to use a ready-made counter object. If you are interested in making such a counter yourself, you can now look at Episode 26. Concepts discussed: object interaction, constructor, field, local variable, assignment, external method call Downloads: trick-the-turtle-v4.zip, Counter.java, counter.png Posted in Greenfoot, Joy Of Code | Tagged assignment, constructor, field, local variable, method call, object interaction | 22 Replies JoC #15: Object interaction (first encounter) Posted on January 26, 2012 by Michael Kolling 16 The pure and simple truth is rarely pure and never simple. — Oscar Wilde Today a long, and quite full episode. We encounter various very important concepts for the first time: local variables, class types and object interaction. If you have questions left after watching this – don’t worry. We will look at all of this again in more detail in future episodes. And you can use the comments below to ask your questions (or make any other comments). By the way, I just noticed I made a mistake. (Yes, that does happen!) There is a bug in the program that I’m writing in this episode. Can you spot it? Download video Concepts discussed: variable, field, local variable, assignment, class type, object interaction, external method call Posted in Greenfoot, Joy Of Code | Tagged assignment, field, local variable, method call, object interaction, type, variable, world size | 16 Replies Search Recent Posts The New Joy of Code – 02: My First Program The New Joy of Code – 01: Introduction The New Joy of Code – Coming Soon! Full paper on Frame-Based Editing out now Greenfoot LIVE Recent Comments Paul Milner on JoC #7: Lettuce is good for you! William H. Hooper on What’s in a symbol? Assignment revisited I love the joy of code on JoC #10: It’s done: Play the game! JoC #30: Introduction to loops | Programming Education Blog on JoC #24: Smoke and mirrors I love the joy of code on JoC #8: Keeping your code clean Archives January 2018 June 2017 April 2017 March 2017 January 2017 November 2016 October 2016 November 2013 August 2013 November 2012 July 2012 June 2012 May 2012 April 2012 March 2012 February 2012 January 2012 October 2011 August 2011 June 2011 April 2011 January 2011 December 2010 November 2010 October 2010 August 2010 June 2010 May 2010 March 2010 September 2009 August 2009 March 2009 December 2008 October 2008 July 2008 March 2008 February 2008 January 2008 December 2007 September 2007 June 2007 April 2007 February 2007 January 2007 November 2006 October 2006 August 2006 July 2006 Categories Blackbox BlueJ General Greenfoot HCI Java Joy Of Code Misc. Programming Research School Software Tools Stride Teaching Proudly powered by WordPress