{"id":639,"date":"2012-04-09T16:20:09","date_gmt":"2012-04-09T15:20:09","guid":{"rendered":"http:\/\/blogs.kent.ac.uk\/mik\/?p=639"},"modified":"2022-09-14T15:17:20","modified_gmt":"2022-09-14T15:17:20","slug":"joc-27","status":"publish","type":"post","link":"https:\/\/blogs.kcl.ac.uk\/proged\/2012\/04\/09\/joc-27\/","title":{"rendered":"JoC #27: Object interaction &#8211; a second look"},"content":{"rendered":"<p><em>\u00a0 \u00a0 \u00a0 Daring ideas are like chessmen moved forward; they may be beaten,<br \/>\n<\/em><em>\u00a0 \u00a0 \u00a0 but they\u00a0<\/em><em>may start a winning game.<br \/>\n<\/em><em>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u2014 Goethe<\/em><\/p>\n<p>In this and the next episode, we&#8217;re looking a bit more into how to set up object structures, and how to get them to interact. This is one of the most fundamental concepts of object-oriented programming, so you need to get your head around this.<\/p>\n<p>We discuss this here with the example of integrating our counter object into a scenario.<\/p>\n<p><iframe loading=\"lazy\" title=\"The Joy of Code #27: Object interaction - a second look\" width=\"584\" height=\"329\" src=\"https:\/\/www.youtube.com\/embed\/TSK8_kNiWoQ?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe><\/p>\n<p style=\"text-align: right\"><a href=\"http:\/\/www.greenfoot.org\/static\/joc\/mov\/JOC-27.mov\">Download video<\/a><\/p>\n<p><strong>Concepts discussed<\/strong>:\u00a0<em>object interaction, object references, score counting, constructors, fields<\/em><\/p>\n<p>Download: <a href=\"http:\/\/www.greenfoot.org\/download\/files\/joc\/breakout-v2.zip\">breakout-v2.zip<\/a> \u00a0(the scenario at the end of this episode)<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u00a0 \u00a0 \u00a0 Daring ideas are like chessmen moved forward; they may be beaten, \u00a0 \u00a0 \u00a0 but they\u00a0may start a winning game. \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u2014 Goethe In this and the next episode, we&#8217;re looking a &hellip; <a href=\"https:\/\/blogs.kcl.ac.uk\/proged\/2012\/04\/09\/joc-27\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":179,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[15,6],"tags":[38,78],"class_list":["post-639","post","type-post","status-publish","format-standard","hentry","category-greenfoot-software-tools","category-joy-of-code","tag-constructor","tag-object-interaction"],"_links":{"self":[{"href":"https:\/\/blogs.kcl.ac.uk\/proged\/wp-json\/wp\/v2\/posts\/639","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.kcl.ac.uk\/proged\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.kcl.ac.uk\/proged\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.kcl.ac.uk\/proged\/wp-json\/wp\/v2\/users\/179"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.kcl.ac.uk\/proged\/wp-json\/wp\/v2\/comments?post=639"}],"version-history":[{"count":2,"href":"https:\/\/blogs.kcl.ac.uk\/proged\/wp-json\/wp\/v2\/posts\/639\/revisions"}],"predecessor-version":[{"id":1120,"href":"https:\/\/blogs.kcl.ac.uk\/proged\/wp-json\/wp\/v2\/posts\/639\/revisions\/1120"}],"wp:attachment":[{"href":"https:\/\/blogs.kcl.ac.uk\/proged\/wp-json\/wp\/v2\/media?parent=639"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.kcl.ac.uk\/proged\/wp-json\/wp\/v2\/categories?post=639"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.kcl.ac.uk\/proged\/wp-json\/wp\/v2\/tags?post=639"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}