{"id":56,"date":"2011-07-21T23:03:46","date_gmt":"2011-07-22T06:03:46","guid":{"rendered":"http:\/\/blogs.unsw.edu.au\/infs1609\/?p=56"},"modified":"2011-07-24T22:07:14","modified_gmt":"2011-07-25T05:07:14","slug":"tutorial-week-2-%e2%80%93-getting-to-know-bluej","status":"publish","type":"post","link":"https:\/\/blogs.unsw.edu.au\/infs1609\/blog\/2011\/07\/tutorial-week-2-%e2%80%93-getting-to-know-bluej\/","title":{"rendered":"Tutorial Week 2 \u2013 Getting to know BlueJ"},"content":{"rendered":"<p>Experiment with the BlueJ projects we saw in lectures.<\/p>\n<ol>\n<li>Login with your zPass login and password.<\/li>\n<li>Download the\u00a0\u2018shapes\u2019 project zip file from <a href=\"http:\/\/www.cse.unsw.edu.au\/~is1609\/11s2\/tuts\/shapes.zip\">here<\/a> .<\/li>\n<li>Download the\u00a0\u2018picture\u2019 project zip file from <a href=\"http:\/\/www.cse.unsw.edu.au\/~is1609\/11s2\/tuts\/picture.zip\">here<\/a> .<\/li>\n<li>Unzip both files in your &#8220;My Documents&#8221; folder.<\/li>\n<li>In the &#8216;Start&#8217; menu, select &#8216;Programs&#8217; and click on BlueJ.<\/li>\n<li>Select \u2018Open Project\u2019 from the File menu and open the \u2018shapes\u2019 project.<\/li>\n<li>Experiment with constructing objects and calling methods. Try to construct a picture out of circles, squares and triangles of different sizes and colours.<\/li>\n<li>Use the inspector to examine the objects you have created. How do the fields on a Triangle differ from those on a Circle?<\/li>\n<li>Double click on the Circle class to view its source code. Try to identify the fields and methods in the code. How much of the code can you understand?<\/li>\n<li>Open the \u2018picture\u2019 project and have a play with the new class it provides.<\/li>\n<li>Open the source code for the Picture class and take a look at the draw() method. This is the code that constructs the house from shapes.<\/li>\n<li>Change some of the method parameters and compile the source. Can you make the sun blue? Can you change the position of the window?<\/li>\n<li><strong>Optional Challenge<\/strong>: Add code to the draw() method to make the sun set using the slowMoveVertical() method on the Circle class.<\/li>\n<li><strong>Optional Extra Challenge:<\/strong> If you did the above challenge you probably found that the sunset happened as soon as the draw() method was called. Try creating a separate method called sunset() that does this instead.<\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>Experiment with the BlueJ projects we saw in lectures. Login with your zPass login and password. Download the\u00a0\u2018shapes\u2019 project zip file from here . Download the\u00a0\u2018picture\u2019 project zip file from here . Unzip both files in your &#8220;My Documents&#8221; folder. In the &#8216;Start&#8217; menu, select &#8216;Programs&#8217; and click on BlueJ. Select \u2018Open Project\u2019 from the [&hellip;]<\/p>\n","protected":false},"author":328,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[236],"tags":[],"class_list":["post-56","post","type-post","status-publish","format-standard","hentry","category-tutorials"],"_links":{"self":[{"href":"https:\/\/blogs.unsw.edu.au\/infs1609\/wp-json\/wp\/v2\/posts\/56","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.unsw.edu.au\/infs1609\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.unsw.edu.au\/infs1609\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.unsw.edu.au\/infs1609\/wp-json\/wp\/v2\/users\/328"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.unsw.edu.au\/infs1609\/wp-json\/wp\/v2\/comments?post=56"}],"version-history":[{"count":10,"href":"https:\/\/blogs.unsw.edu.au\/infs1609\/wp-json\/wp\/v2\/posts\/56\/revisions"}],"predecessor-version":[{"id":68,"href":"https:\/\/blogs.unsw.edu.au\/infs1609\/wp-json\/wp\/v2\/posts\/56\/revisions\/68"}],"wp:attachment":[{"href":"https:\/\/blogs.unsw.edu.au\/infs1609\/wp-json\/wp\/v2\/media?parent=56"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.unsw.edu.au\/infs1609\/wp-json\/wp\/v2\/categories?post=56"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.unsw.edu.au\/infs1609\/wp-json\/wp\/v2\/tags?post=56"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}