{"action":"created","comment":{"url":"https://api.github.com/repos/cst1201-d644/Calculator/pulls/comments/26697131","id":26697131,"diff_hunk":"@@ -0,0 +1,62 @@\n+\r\n+package lab3;\r\n+\r\n+import java.util.Scanner;\r\n+\r\n+/**\r\n+*\r\n+* @author Yadadye Abramov\r\n+*/\r\n+public class Calculator {\r\n+\r\n+/**\r\n+* @param args the command line arguments\r\n+*/\r\n+public static void main(String[] args) {\r\n+int num1;\r\n+int num2;\r\n+\r\n+String operation;\r\n+String operator1 = \"+\",\r\n+operator2 = \"-\",\r\n+operator3 = \"*\",\r\n+operator4 = \"/\";\r\n+\r\n+Scanner keyboard = new Scanner(System.in);\r\n+\r\n+System.out.println(\"Please enter an operator: \");\r\n+operation = keyboard.next();\r\n+\r\n+System.out.println(\"Enter an integer:\");\r\n+num1 = keyboard.nextInt();\r\n+\r\n+System.out.println(\"Enter another integer:\");\r\n+num2 = keyboard.nextInt();\r\n+\r\n+if (operation.equals(operator1)) {\r\n+System.out.println(\"Answer: \" + (num1 + num2));\r\n+}\r\n+\r\n+if (operation.equals(operator2)) {\r\n+System.out.println(\"Answer: \" + (num1 - num2));\r\n+}\r\n+\r\n+if (operation.equals(operator3)) {\r\n+System.out.println(\"Answer: \" + (num1 * num2));\r\n+}\r\n+\r\n+if (operation.equals(operator4)) {\r\n+if (num2 == 0) {\r\n+System.out.println(\"Divide by zero error!!!\");\r\n+} else if (num1 < num2) {\r\n+System.out.println(\"0 and \" + (num1 + \"/\" + num2));\r\n+} else if (num1 > num2 && num1 % num2 == 0) {\r\n+System.out.println(\"Answer: \" + num1 / num2);\r\n+} else {\r\n+System.out.println(\"Answer: \" + (num1 / num2) + \" and \" + (num1 % num2) + \"/\" + num2);\r\n+}\r\n+} else if (!operation.equals(operator1) && !operation.equals(operator2) && !operation.equals(operator3) && !operation.equals(operator4)) {\r","path":"Lab3/src/lab3/Calculator.java","position":58,"original_position":58,"commit_id":"924dfe74ef8bc6010f576b670517e64c00d5e17b","original_commit_id":"924dfe74ef8bc6010f576b670517e64c00d5e17b","user":{"login":"khatchad","id":2048831,"avatar_url":"https://avatars.githubusercontent.com/u/2048831?v=3","gravatar_id":"","url":"https://api.github.com/users/khatchad","html_url":"https://github.com/khatchad","followers_url":"https://api.github.com/users/khatchad/followers","following_url":"https://api.github.com/users/khatchad/following{/other_user}","gists_url":"https://api.github.com/users/khatchad/gists{/gist_id}","starred_url":"https://api.github.com/users/khatchad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/khatchad/subscriptions","organizations_url":"https://api.github.com/users/khatchad/orgs","repos_url":"https://api.github.com/users/khatchad/repos","events_url":"https://api.github.com/users/khatchad/events{/privacy}","received_events_url":"https://api.github.com/users/khatchad/received_events","type":"User","site_admin":false},"body":"Wow! That is long! Can you think about using `else` instead?","created_at":"2015-03-18T19:14:36Z","updated_at":"2015-03-18T19:14:36Z","html_url":"https://github.com/cst1201-d644/Calculator/pull/2#discussion_r26697131","pull_request_url":"https://api.github.com/repos/cst1201-d644/Calculator/pulls/2","_links":{"self":{"href":"https://api.github.com/repos/cst1201-d644/Calculator/pulls/comments/26697131"},"html":{"href":"https://github.com/cst1201-d644/Calculator/pull/2#discussion_r26697131"},"pull_request":{"href":"https://api.github.com/repos/cst1201-d644/Calculator/pulls/2"}}},"pull_request":{"url":"https://api.github.com/repos/cst1201-d644/Calculator/pulls/2","id":31451781,"html_url":"https://github.com/cst1201-d644/Calculator/pull/2","diff_url":"https://github.com/cst1201-d644/Calculator/pull/2.diff","patch_url":"https://github.com/cst1201-d644/Calculator/pull/2.patch","issue_url":"https://api.github.com/repos/cst1201-d644/Calculator/issues/2","number":2,"state":"open","locked":false,"title":"Submission LAB 3","user":{"login":"Yadadye","id":10855879,"avatar_url":"https://avatars.githubusercontent.com/u/10855879?v=3","gravatar_id":"","url":"https://api.github.com/users/Yadadye","html_url":"https://github.com/Yadadye","followers_url":"https://api.github.com/users/Yadadye/followers","following_url":"https://api.github.com/users/Yadadye/following{/other_user}","gists_url":"https://api.github.com/users/Yadadye/gists{/gist_id}","starred_url":"https://api.github.com/users/Yadadye/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Yadadye/subscriptions","organizations_url":"https://api.github.com/users/Yadadye/orgs","repos_url":"https://api.github.com/users/Yadadye/repos","events_url":"https://api.github.com/users/Yadadye/events{/privacy}","received_events_url":"https://api.github.com/users/Yadadye/received_events","type":"User","site_admin":false},"body":"took a couple of tries, but I think I got it.  Ready for submission contains the full work. ","created_at":"2015-03-18T17:24:40Z","updated_at":"2015-03-18T19:14:36Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b344205031c8f5f95c527b517f91b06efe759944","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/cst1201-d644/Calculator/pulls/2/commits","review_comments_url":"https://api.github.com/repos/cst1201-d644/Calculator/pulls/2/comments","review_comment_url":"https://api.github.com/repos/cst1201-d644/Calculator/pulls/comments{/number}","comments_url":"https://api.github.com/repos/cst1201-d644/Calculator/issues/2/comments","statuses_url":"https://api.github.com/repos/cst1201-d644/Calculator/statuses/924dfe74ef8bc6010f576b670517e64c00d5e17b","head":{"label":"Yadadye:master","ref":"master","sha":"924dfe74ef8bc6010f576b670517e64c00d5e17b","user":{"login":"Yadadye","id":10855879,"avatar_url":"https://avatars.githubusercontent.com/u/10855879?v=3","gravatar_id":"","url":"https://api.github.com/users/Yadadye","html_url":"https://github.com/Yadadye","followers_url":"https://api.github.com/users/Yadadye/followers","following_url":"https://api.github.com/users/Yadadye/following{/other_user}","gists_url":"https://api.github.com/users/Yadadye/gists{/gist_id}","starred_url":"https://api.github.com/users/Yadadye/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Yadadye/subscriptions","organizations_url":"https://api.github.com/users/Yadadye/orgs","repos_url":"https://api.github.com/users/Yadadye/repos","events_url":"https://api.github.com/users/Yadadye/events{/privacy}","received_events_url":"https://api.github.com/users/Yadadye/received_events","type":"User","site_admin":false},"repo":{"id":32472251,"name":"Calculator","full_name":"Yadadye/Calculator","owner":{"login":"Yadadye","id":10855879,"avatar_url":"https://avatars.githubusercontent.com/u/10855879?v=3","gravatar_id":"","url":"https://api.github.com/users/Yadadye","html_url":"https://github.com/Yadadye","followers_url":"https://api.github.com/users/Yadadye/followers","following_url":"https://api.github.com/users/Yadadye/following{/other_user}","gists_url":"https://api.github.com/users/Yadadye/gists{/gist_id}","starred_url":"https://api.github.com/users/Yadadye/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Yadadye/subscriptions","organizations_url":"https://api.github.com/users/Yadadye/orgs","repos_url":"https://api.github.com/users/Yadadye/repos","events_url":"https://api.github.com/users/Yadadye/events{/privacy}","received_events_url":"https://api.github.com/users/Yadadye/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Yadadye/Calculator","description":"The calculator lab.","fork":true,"url":"https://api.github.com/repos/Yadadye/Calculator","forks_url":"https://api.github.com/repos/Yadadye/Calculator/forks","keys_url":"https://api.github.com/repos/Yadadye/Calculator/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Yadadye/Calculator/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Yadadye/Calculator/teams","hooks_url":"https://api.github.com/repos/Yadadye/Calculator/hooks","issue_events_url":"https://api.github.com/repos/Yadadye/Calculator/issues/events{/number}","events_url":"https://api.github.com/repos/Yadadye/Calculator/events","assignees_url":"https://api.github.com/repos/Yadadye/Calculator/assignees{/user}","branches_url":"https://api.github.com/repos/Yadadye/Calculator/branches{/branch}","tags_url":"https://api.github.com/repos/Yadadye/Calculator/tags","blobs_url":"https://api.github.com/repos/Yadadye/Calculator/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Yadadye/Calculator/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Yadadye/Calculator/git/refs{/sha}","trees_url":"https://api.github.com/repos/Yadadye/Calculator/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Yadadye/Calculator/statuses/{sha}","languages_url":"https://api.github.com/repos/Yadadye/Calculator/languages","stargazers_url":"https://api.github.com/repos/Yadadye/Calculator/stargazers","contributors_url":"https://api.github.com/repos/Yadadye/Calculator/contributors","subscribers_url":"https://api.github.com/repos/Yadadye/Calculator/subscribers","subscription_url":"https://api.github.com/repos/Yadadye/Calculator/subscription","commits_url":"https://api.github.com/repos/Yadadye/Calculator/commits{/sha}","git_commits_url":"https://api.github.com/repos/Yadadye/Calculator/git/commits{/sha}","comments_url":"https://api.github.com/repos/Yadadye/Calculator/comments{/number}","issue_comment_url":"https://api.github.com/repos/Yadadye/Calculator/issues/comments{/number}","contents_url":"https://api.github.com/repos/Yadadye/Calculator/contents/{+path}","compare_url":"https://api.github.com/repos/Yadadye/Calculator/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Yadadye/Calculator/merges","archive_url":"https://api.github.com/repos/Yadadye/Calculator/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Yadadye/Calculator/downloads","issues_url":"https://api.github.com/repos/Yadadye/Calculator/issues{/number}","pulls_url":"https://api.github.com/repos/Yadadye/Calculator/pulls{/number}","milestones_url":"https://api.github.com/repos/Yadadye/Calculator/milestones{/number}","notifications_url":"https://api.github.com/repos/Yadadye/Calculator/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Yadadye/Calculator/labels{/name}","releases_url":"https://api.github.com/repos/Yadadye/Calculator/releases{/id}","created_at":"2015-03-18T17:01:31Z","updated_at":"2015-03-18T17:21:56Z","pushed_at":"2015-03-18T17:21:56Z","git_url":"git://github.com/Yadadye/Calculator.git","ssh_url":"git@github.com:Yadadye/Calculator.git","clone_url":"https://github.com/Yadadye/Calculator.git","svn_url":"https://github.com/Yadadye/Calculator","homepage":null,"size":141,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"cst1201-d644:master","ref":"master","sha":"8492d2e06235c94b6f5d92927dbc94b90c7fed0b","user":{"login":"cst1201-d644","id":10299488,"avatar_url":"https://avatars.githubusercontent.com/u/10299488?v=3","gravatar_id":"","url":"https://api.github.com/users/cst1201-d644","html_url":"https://github.com/cst1201-d644","followers_url":"https://api.github.com/users/cst1201-d644/followers","following_url":"https://api.github.com/users/cst1201-d644/following{/other_user}","gists_url":"https://api.github.com/users/cst1201-d644/gists{/gist_id}","starred_url":"https://api.github.com/users/cst1201-d644/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cst1201-d644/subscriptions","organizations_url":"https://api.github.com/users/cst1201-d644/orgs","repos_url":"https://api.github.com/users/cst1201-d644/repos","events_url":"https://api.github.com/users/cst1201-d644/events{/privacy}","received_events_url":"https://api.github.com/users/cst1201-d644/received_events","type":"Organization","site_admin":false},"repo":{"id":31932082,"name":"Calculator","full_name":"cst1201-d644/Calculator","owner":{"login":"cst1201-d644","id":10299488,"avatar_url":"https://avatars.githubusercontent.com/u/10299488?v=3","gravatar_id":"","url":"https://api.github.com/users/cst1201-d644","html_url":"https://github.com/cst1201-d644","followers_url":"https://api.github.com/users/cst1201-d644/followers","following_url":"https://api.github.com/users/cst1201-d644/following{/other_user}","gists_url":"https://api.github.com/users/cst1201-d644/gists{/gist_id}","starred_url":"https://api.github.com/users/cst1201-d644/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cst1201-d644/subscriptions","organizations_url":"https://api.github.com/users/cst1201-d644/orgs","repos_url":"https://api.github.com/users/cst1201-d644/repos","events_url":"https://api.github.com/users/cst1201-d644/events{/privacy}","received_events_url":"https://api.github.com/users/cst1201-d644/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/cst1201-d644/Calculator","description":"The calculator lab.","fork":false,"url":"https://api.github.com/repos/cst1201-d644/Calculator","forks_url":"https://api.github.com/repos/cst1201-d644/Calculator/forks","keys_url":"https://api.github.com/repos/cst1201-d644/Calculator/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cst1201-d644/Calculator/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cst1201-d644/Calculator/teams","hooks_url":"https://api.github.com/repos/cst1201-d644/Calculator/hooks","issue_events_url":"https://api.github.com/repos/cst1201-d644/Calculator/issues/events{/number}","events_url":"https://api.github.com/repos/cst1201-d644/Calculator/events","assignees_url":"https://api.github.com/repos/cst1201-d644/Calculator/assignees{/user}","branches_url":"https://api.github.com/repos/cst1201-d644/Calculator/branches{/branch}","tags_url":"https://api.github.com/repos/cst1201-d644/Calculator/tags","blobs_url":"https://api.github.com/repos/cst1201-d644/Calculator/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cst1201-d644/Calculator/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cst1201-d644/Calculator/git/refs{/sha}","trees_url":"https://api.github.com/repos/cst1201-d644/Calculator/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cst1201-d644/Calculator/statuses/{sha}","languages_url":"https://api.github.com/repos/cst1201-d644/Calculator/languages","stargazers_url":"https://api.github.com/repos/cst1201-d644/Calculator/stargazers","contributors_url":"https://api.github.com/repos/cst1201-d644/Calculator/contributors","subscribers_url":"https://api.github.com/repos/cst1201-d644/Calculator/subscribers","subscription_url":"https://api.github.com/repos/cst1201-d644/Calculator/subscription","commits_url":"https://api.github.com/repos/cst1201-d644/Calculator/commits{/sha}","git_commits_url":"https://api.github.com/repos/cst1201-d644/Calculator/git/commits{/sha}","comments_url":"https://api.github.com/repos/cst1201-d644/Calculator/comments{/number}","issue_comment_url":"https://api.github.com/repos/cst1201-d644/Calculator/issues/comments{/number}","contents_url":"https://api.github.com/repos/cst1201-d644/Calculator/contents/{+path}","compare_url":"https://api.github.com/repos/cst1201-d644/Calculator/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cst1201-d644/Calculator/merges","archive_url":"https://api.github.com/repos/cst1201-d644/Calculator/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cst1201-d644/Calculator/downloads","issues_url":"https://api.github.com/repos/cst1201-d644/Calculator/issues{/number}","pulls_url":"https://api.github.com/repos/cst1201-d644/Calculator/pulls{/number}","milestones_url":"https://api.github.com/repos/cst1201-d644/Calculator/milestones{/number}","notifications_url":"https://api.github.com/repos/cst1201-d644/Calculator/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cst1201-d644/Calculator/labels{/name}","releases_url":"https://api.github.com/repos/cst1201-d644/Calculator/releases{/id}","created_at":"2015-03-10T01:33:07Z","updated_at":"2015-03-10T01:33:07Z","pushed_at":"2015-03-10T01:33:07Z","git_url":"git://github.com/cst1201-d644/Calculator.git","ssh_url":"git@github.com:cst1201-d644/Calculator.git","clone_url":"https://github.com/cst1201-d644/Calculator.git","svn_url":"https://github.com/cst1201-d644/Calculator","homepage":null,"size":141,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":22,"mirror_url":null,"open_issues_count":2,"forks":22,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/cst1201-d644/Calculator/pulls/2"},"html":{"href":"https://github.com/cst1201-d644/Calculator/pull/2"},"issue":{"href":"https://api.github.com/repos/cst1201-d644/Calculator/issues/2"},"comments":{"href":"https://api.github.com/repos/cst1201-d644/Calculator/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/cst1201-d644/Calculator/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/cst1201-d644/Calculator/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/cst1201-d644/Calculator/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/cst1201-d644/Calculator/statuses/924dfe74ef8bc6010f576b670517e64c00d5e17b"}}}}