{"action":"created","comment":{"url":"https://api.github.com/repos/ognjencetkovic/homeworks/pulls/comments/32844166","id":32844166,"diff_hunk":"@@ -0,0 +1,89 @@\n+package ba.bitcamp.task01;\n+/**\n+ * Class representing a locomotive.\n+ * @author Ognjen\n+ *\n+ */\n+public class Locomotive {\n+\n+\tprivate Rectangle platform;\n+\tprivate Square cabin;\n+\tprivate Circle[] windows;\n+\tprivate Circle[] wheels;\n+\tprivate Rectangle chimney;\n+\t\n+\t/**\n+\t * @param platform\n+\t * @param cabin\n+\t * @param windowSize\n+\t * @param wheelSize\n+\t * @param chimney\n+\t */\n+\tpublic Locomotive(Rectangle platform, Square cabin, int windowSize,\n+\t\t\tint wheelSize, Rectangle chimney) {\n+\t\tthis.platform = platform;\n+\t\tthis.cabin = cabin;\n+\t\tthis.windows = new Circle[]{new Circle(windowSize), new Circle(windowSize)};\n+\t\tthis.wheels = new Circle[]{new Circle(wheelSize), new Circle(wheelSize)};\n+\t\tthis.chimney = chimney;\n+\t}\n+\n+\t/**\n+\t * @return the platform\n+\t */\n+\tpublic Rectangle getPlatform() {\n+\t\treturn platform;\n+\t}\n+\n+\t/**\n+\t * @return the cabin\n+\t */\n+\tpublic Square getCabin() {\n+\t\treturn cabin;\n+\t}\n+\n+\t/**\n+\t * @return the windows\n+\t */\n+\tpublic Circle[] getWindows() {\n+\t\treturn windows;\n+\t}\n+\n+\t/**\n+\t * @return the wheels\n+\t */\n+\tpublic Circle[] getWheels() {\n+\t\treturn wheels;\n+\t}\n+\n+\t/**\n+\t * @return the chimney\n+\t */\n+\tpublic Rectangle getChimney() {\n+\t\treturn chimney;\n+\t}\n+\t\n+\t/**\n+\t * @return Area of the locomotive\n+\t */\n+\tpublic int getArea(){\n+\t\tint area = platform.getArea() + chimney.getArea();\n+\t\tfor (int i = 0; i < wheels.length; i++) {\n+\t\t\tarea += wheels[i].getArea();\n+\t\t}\n+\t\treturn area;\n+\t}\n+\t\n+\t/**\n+\t * @return Perimeter of the locomotive\n+\t */\n+\tpublic int getPerimeter(){\n+\t\tint perimeter = platform.getPerimeter() + cabin.getPerimeter();\n+\t\tfor (int i = 0; i < wheels.length; i++) {","path":"HomeworkExercisingClasses/src/ba/bitcamp/task01/Locomotive.java","position":82,"original_position":82,"commit_id":"562c5a32d38021d5536ad417410187da14a3679f","original_commit_id":"562c5a32d38021d5536ad417410187da14a3679f","user":{"login":"kklisura","id":4710775,"avatar_url":"https://avatars.githubusercontent.com/u/4710775?v=3","gravatar_id":"","url":"https://api.github.com/users/kklisura","html_url":"https://github.com/kklisura","followers_url":"https://api.github.com/users/kklisura/followers","following_url":"https://api.github.com/users/kklisura/following{/other_user}","gists_url":"https://api.github.com/users/kklisura/gists{/gist_id}","starred_url":"https://api.github.com/users/kklisura/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kklisura/subscriptions","organizations_url":"https://api.github.com/users/kklisura/orgs","repos_url":"https://api.github.com/users/kklisura/repos","events_url":"https://api.github.com/users/kklisura/events{/privacy}","received_events_url":"https://api.github.com/users/kklisura/received_events","type":"User","site_admin":false},"body":"Ovdje koristimo index i od 0 do velicine wheels niza, te isti index koristimo za pristup elementima wheels i windows. Kako su wheels i windows 2 razlicita niza, koja ne moraju imati isti broj elementa, potrebne su 2 for petlje: jedna da prolazi kroz wheels i jos jedna da prolazi kroz windows.","created_at":"2015-06-19T16:17:16Z","updated_at":"2015-06-19T16:17:16Z","html_url":"https://github.com/ognjencetkovic/homeworks/pull/1#discussion_r32844166","pull_request_url":"https://api.github.com/repos/ognjencetkovic/homeworks/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/ognjencetkovic/homeworks/pulls/comments/32844166"},"html":{"href":"https://github.com/ognjencetkovic/homeworks/pull/1#discussion_r32844166"},"pull_request":{"href":"https://api.github.com/repos/ognjencetkovic/homeworks/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/ognjencetkovic/homeworks/pulls/1","id":38097292,"html_url":"https://github.com/ognjencetkovic/homeworks/pull/1","diff_url":"https://github.com/ognjencetkovic/homeworks/pull/1.diff","patch_url":"https://github.com/ognjencetkovic/homeworks/pull/1.patch","issue_url":"https://api.github.com/repos/ognjencetkovic/homeworks/issues/1","number":1,"state":"open","locked":false,"title":"Solved task for homework","user":{"login":"ognjencetkovic","id":12545891,"avatar_url":"https://avatars.githubusercontent.com/u/12545891?v=3","gravatar_id":"","url":"https://api.github.com/users/ognjencetkovic","html_url":"https://github.com/ognjencetkovic","followers_url":"https://api.github.com/users/ognjencetkovic/followers","following_url":"https://api.github.com/users/ognjencetkovic/following{/other_user}","gists_url":"https://api.github.com/users/ognjencetkovic/gists{/gist_id}","starred_url":"https://api.github.com/users/ognjencetkovic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ognjencetkovic/subscriptions","organizations_url":"https://api.github.com/users/ognjencetkovic/orgs","repos_url":"https://api.github.com/users/ognjencetkovic/repos","events_url":"https://api.github.com/users/ognjencetkovic/events{/privacy}","received_events_url":"https://api.github.com/users/ognjencetkovic/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-06-19T11:03:14Z","updated_at":"2015-06-19T16:17:16Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6b49e12758e7d2b93f13e2e5e7123e2a940adc36","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ognjencetkovic/homeworks/pulls/1/commits","review_comments_url":"https://api.github.com/repos/ognjencetkovic/homeworks/pulls/1/comments","review_comment_url":"https://api.github.com/repos/ognjencetkovic/homeworks/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ognjencetkovic/homeworks/issues/1/comments","statuses_url":"https://api.github.com/repos/ognjencetkovic/homeworks/statuses/562c5a32d38021d5536ad417410187da14a3679f","head":{"label":"ognjencetkovic:zadacaVjezbanjeKlasa","ref":"zadacaVjezbanjeKlasa","sha":"562c5a32d38021d5536ad417410187da14a3679f","user":{"login":"ognjencetkovic","id":12545891,"avatar_url":"https://avatars.githubusercontent.com/u/12545891?v=3","gravatar_id":"","url":"https://api.github.com/users/ognjencetkovic","html_url":"https://github.com/ognjencetkovic","followers_url":"https://api.github.com/users/ognjencetkovic/followers","following_url":"https://api.github.com/users/ognjencetkovic/following{/other_user}","gists_url":"https://api.github.com/users/ognjencetkovic/gists{/gist_id}","starred_url":"https://api.github.com/users/ognjencetkovic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ognjencetkovic/subscriptions","organizations_url":"https://api.github.com/users/ognjencetkovic/orgs","repos_url":"https://api.github.com/users/ognjencetkovic/repos","events_url":"https://api.github.com/users/ognjencetkovic/events{/privacy}","received_events_url":"https://api.github.com/users/ognjencetkovic/received_events","type":"User","site_admin":false},"repo":{"id":37670964,"name":"homeworks","full_name":"ognjencetkovic/homeworks","owner":{"login":"ognjencetkovic","id":12545891,"avatar_url":"https://avatars.githubusercontent.com/u/12545891?v=3","gravatar_id":"","url":"https://api.github.com/users/ognjencetkovic","html_url":"https://github.com/ognjencetkovic","followers_url":"https://api.github.com/users/ognjencetkovic/followers","following_url":"https://api.github.com/users/ognjencetkovic/following{/other_user}","gists_url":"https://api.github.com/users/ognjencetkovic/gists{/gist_id}","starred_url":"https://api.github.com/users/ognjencetkovic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ognjencetkovic/subscriptions","organizations_url":"https://api.github.com/users/ognjencetkovic/orgs","repos_url":"https://api.github.com/users/ognjencetkovic/repos","events_url":"https://api.github.com/users/ognjencetkovic/events{/privacy}","received_events_url":"https://api.github.com/users/ognjencetkovic/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ognjencetkovic/homeworks","description":"","fork":false,"url":"https://api.github.com/repos/ognjencetkovic/homeworks","forks_url":"https://api.github.com/repos/ognjencetkovic/homeworks/forks","keys_url":"https://api.github.com/repos/ognjencetkovic/homeworks/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ognjencetkovic/homeworks/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ognjencetkovic/homeworks/teams","hooks_url":"https://api.github.com/repos/ognjencetkovic/homeworks/hooks","issue_events_url":"https://api.github.com/repos/ognjencetkovic/homeworks/issues/events{/number}","events_url":"https://api.github.com/repos/ognjencetkovic/homeworks/events","assignees_url":"https://api.github.com/repos/ognjencetkovic/homeworks/assignees{/user}","branches_url":"https://api.github.com/repos/ognjencetkovic/homeworks/branches{/branch}","tags_url":"https://api.github.com/repos/ognjencetkovic/homeworks/tags","blobs_url":"https://api.github.com/repos/ognjencetkovic/homeworks/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ognjencetkovic/homeworks/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ognjencetkovic/homeworks/git/refs{/sha}","trees_url":"https://api.github.com/repos/ognjencetkovic/homeworks/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ognjencetkovic/homeworks/statuses/{sha}","languages_url":"https://api.github.com/repos/ognjencetkovic/homeworks/languages","stargazers_url":"https://api.github.com/repos/ognjencetkovic/homeworks/stargazers","contributors_url":"https://api.github.com/repos/ognjencetkovic/homeworks/contributors","subscribers_url":"https://api.github.com/repos/ognjencetkovic/homeworks/subscribers","subscription_url":"https://api.github.com/repos/ognjencetkovic/homeworks/subscription","commits_url":"https://api.github.com/repos/ognjencetkovic/homeworks/commits{/sha}","git_commits_url":"https://api.github.com/repos/ognjencetkovic/homeworks/git/commits{/sha}","comments_url":"https://api.github.com/repos/ognjencetkovic/homeworks/comments{/number}","issue_comment_url":"https://api.github.com/repos/ognjencetkovic/homeworks/issues/comments{/number}","contents_url":"https://api.github.com/repos/ognjencetkovic/homeworks/contents/{+path}","compare_url":"https://api.github.com/repos/ognjencetkovic/homeworks/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ognjencetkovic/homeworks/merges","archive_url":"https://api.github.com/repos/ognjencetkovic/homeworks/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ognjencetkovic/homeworks/downloads","issues_url":"https://api.github.com/repos/ognjencetkovic/homeworks/issues{/number}","pulls_url":"https://api.github.com/repos/ognjencetkovic/homeworks/pulls{/number}","milestones_url":"https://api.github.com/repos/ognjencetkovic/homeworks/milestones{/number}","notifications_url":"https://api.github.com/repos/ognjencetkovic/homeworks/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ognjencetkovic/homeworks/labels{/name}","releases_url":"https://api.github.com/repos/ognjencetkovic/homeworks/releases{/id}","created_at":"2015-06-18T16:26:02Z","updated_at":"2015-06-19T10:50:44Z","pushed_at":"2015-06-19T11:03:14Z","git_url":"git://github.com/ognjencetkovic/homeworks.git","ssh_url":"git@github.com:ognjencetkovic/homeworks.git","clone_url":"https://github.com/ognjencetkovic/homeworks.git","svn_url":"https://github.com/ognjencetkovic/homeworks","homepage":null,"size":0,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"ognjencetkovic:master","ref":"master","sha":"be5940b0e6e9804c255409636cfdb0c56cc1778b","user":{"login":"ognjencetkovic","id":12545891,"avatar_url":"https://avatars.githubusercontent.com/u/12545891?v=3","gravatar_id":"","url":"https://api.github.com/users/ognjencetkovic","html_url":"https://github.com/ognjencetkovic","followers_url":"https://api.github.com/users/ognjencetkovic/followers","following_url":"https://api.github.com/users/ognjencetkovic/following{/other_user}","gists_url":"https://api.github.com/users/ognjencetkovic/gists{/gist_id}","starred_url":"https://api.github.com/users/ognjencetkovic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ognjencetkovic/subscriptions","organizations_url":"https://api.github.com/users/ognjencetkovic/orgs","repos_url":"https://api.github.com/users/ognjencetkovic/repos","events_url":"https://api.github.com/users/ognjencetkovic/events{/privacy}","received_events_url":"https://api.github.com/users/ognjencetkovic/received_events","type":"User","site_admin":false},"repo":{"id":37670964,"name":"homeworks","full_name":"ognjencetkovic/homeworks","owner":{"login":"ognjencetkovic","id":12545891,"avatar_url":"https://avatars.githubusercontent.com/u/12545891?v=3","gravatar_id":"","url":"https://api.github.com/users/ognjencetkovic","html_url":"https://github.com/ognjencetkovic","followers_url":"https://api.github.com/users/ognjencetkovic/followers","following_url":"https://api.github.com/users/ognjencetkovic/following{/other_user}","gists_url":"https://api.github.com/users/ognjencetkovic/gists{/gist_id}","starred_url":"https://api.github.com/users/ognjencetkovic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ognjencetkovic/subscriptions","organizations_url":"https://api.github.com/users/ognjencetkovic/orgs","repos_url":"https://api.github.com/users/ognjencetkovic/repos","events_url":"https://api.github.com/users/ognjencetkovic/events{/privacy}","received_events_url":"https://api.github.com/users/ognjencetkovic/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ognjencetkovic/homeworks","description":"","fork":false,"url":"https://api.github.com/repos/ognjencetkovic/homeworks","forks_url":"https://api.github.com/repos/ognjencetkovic/homeworks/forks","keys_url":"https://api.github.com/repos/ognjencetkovic/homeworks/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ognjencetkovic/homeworks/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ognjencetkovic/homeworks/teams","hooks_url":"https://api.github.com/repos/ognjencetkovic/homeworks/hooks","issue_events_url":"https://api.github.com/repos/ognjencetkovic/homeworks/issues/events{/number}","events_url":"https://api.github.com/repos/ognjencetkovic/homeworks/events","assignees_url":"https://api.github.com/repos/ognjencetkovic/homeworks/assignees{/user}","branches_url":"https://api.github.com/repos/ognjencetkovic/homeworks/branches{/branch}","tags_url":"https://api.github.com/repos/ognjencetkovic/homeworks/tags","blobs_url":"https://api.github.com/repos/ognjencetkovic/homeworks/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ognjencetkovic/homeworks/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ognjencetkovic/homeworks/git/refs{/sha}","trees_url":"https://api.github.com/repos/ognjencetkovic/homeworks/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ognjencetkovic/homeworks/statuses/{sha}","languages_url":"https://api.github.com/repos/ognjencetkovic/homeworks/languages","stargazers_url":"https://api.github.com/repos/ognjencetkovic/homeworks/stargazers","contributors_url":"https://api.github.com/repos/ognjencetkovic/homeworks/contributors","subscribers_url":"https://api.github.com/repos/ognjencetkovic/homeworks/subscribers","subscription_url":"https://api.github.com/repos/ognjencetkovic/homeworks/subscription","commits_url":"https://api.github.com/repos/ognjencetkovic/homeworks/commits{/sha}","git_commits_url":"https://api.github.com/repos/ognjencetkovic/homeworks/git/commits{/sha}","comments_url":"https://api.github.com/repos/ognjencetkovic/homeworks/comments{/number}","issue_comment_url":"https://api.github.com/repos/ognjencetkovic/homeworks/issues/comments{/number}","contents_url":"https://api.github.com/repos/ognjencetkovic/homeworks/contents/{+path}","compare_url":"https://api.github.com/repos/ognjencetkovic/homeworks/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ognjencetkovic/homeworks/merges","archive_url":"https://api.github.com/repos/ognjencetkovic/homeworks/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ognjencetkovic/homeworks/downloads","issues_url":"https://api.github.com/repos/ognjencetkovic/homeworks/issues{/number}","pulls_url":"https://api.github.com/repos/ognjencetkovic/homeworks/pulls{/number}","milestones_url":"https://api.github.com/repos/ognjencetkovic/homeworks/milestones{/number}","notifications_url":"https://api.github.com/repos/ognjencetkovic/homeworks/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ognjencetkovic/homeworks/labels{/name}","releases_url":"https://api.github.com/repos/ognjencetkovic/homeworks/releases{/id}","created_at":"2015-06-18T16:26:02Z","updated_at":"2015-06-19T10:50:44Z","pushed_at":"2015-06-19T11:03:14Z","git_url":"git://github.com/ognjencetkovic/homeworks.git","ssh_url":"git@github.com:ognjencetkovic/homeworks.git","clone_url":"https://github.com/ognjencetkovic/homeworks.git","svn_url":"https://github.com/ognjencetkovic/homeworks","homepage":null,"size":0,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ognjencetkovic/homeworks/pulls/1"},"html":{"href":"https://github.com/ognjencetkovic/homeworks/pull/1"},"issue":{"href":"https://api.github.com/repos/ognjencetkovic/homeworks/issues/1"},"comments":{"href":"https://api.github.com/repos/ognjencetkovic/homeworks/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/ognjencetkovic/homeworks/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/ognjencetkovic/homeworks/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ognjencetkovic/homeworks/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/ognjencetkovic/homeworks/statuses/562c5a32d38021d5536ad417410187da14a3679f"}}}}