{"action":"created","comment":{"url":"https://api.github.com/repos/meta-udit-nagar/get2015/pulls/comments/37262952","id":37262952,"diff_hunk":"@@ -0,0 +1,233 @@\n+import java.io.BufferedReader;\n+import java.io.FileNotFoundException;\n+import java.io.FileReader;\n+import java.io.IOException;\n+import java.util.ArrayList;\n+import java.util.HashMap;\n+import java.util.Scanner;\n+\n+public class SurveySystem {\n+\n+\tstatic ArrayList<Participant> participantList = new ArrayList<Participant>();\n+\tstatic ArrayList<Question> questionList = new ArrayList<Question>();\n+\n+\tstatic ArrayList<Question> genrateQuestions() {\n+\n+\t\tfinal String COMMA_DELIMITER = \",\";\n+\t\tfinal String url = \"D://Question/question.csv\";\n+\t\tArrayList<Question> questionList = new ArrayList<Question>();\n+\n+\t\tBufferedReader fileReader = null;\n+\t\ttry {\n+\n+\t\t\tString line = \"\";\n+\t\t\tfileReader = new BufferedReader(new FileReader(url));// file reading\n+\t\t\tfileReader.readLine();\n+\t\t\twhile ((line = fileReader.readLine()) != null) {\n+\n+\t\t\t\tQuestion question = new Question();\n+\t\t\t\tString[] tokens = line.split(COMMA_DELIMITER);// separator\n+\t\t\t\tif (tokens.length > 0) {\n+\t\t\t\t\tquestion.setOptions(tokens[2]);\n+\t\t\t\t\tquestion.setQuestion(tokens[0]);\n+\t\t\t\t\tif (tokens[1].equals(\"Multi Select\"))\n+\t\t\t\t\t\tquestion.type = Question.Type.Multi_Select;\n+\t\t\t\t\telse if (tokens[1].equals(\"Single Select\"))\n+\t\t\t\t\t\tquestion.type = Question.Type.Single_select;\n+\t\t\t\t\telse\n+\t\t\t\t\t\tquestion.type = Question.Type.Text;\n+\n+\t\t\t\t}\n+\t\t\t\tquestionList.add(question);\n+\t\t\t}\n+\t\t} catch (FileNotFoundException e) {\n+\t\t\te.printStackTrace();\n+\t\t} catch (IOException e) {\n+\t\t\te.printStackTrace();\n+\t\t} finally {\n+\t\t\ttry {\n+\t\t\t\tfileReader.close();\n+\t\t\t} catch (IOException e) {\n+\n+\t\t\t\te.printStackTrace();\n+\t\t\t}\n+\t\t}\n+\t\treturn questionList;\n+\n+\t}\n+\n+\tstatic ArrayList<Participant> inputProcess(ArrayList<Question> questionList) {\n+\t\tScanner scanner = new Scanner(System.in);\n+\n+\t\tParticipant participant = new Participant();\n+\t\tArrayList<String> questionsAnswered = new ArrayList<String>();\n+\t\tSystem.out.println(\"Enter participant name\");\n+\t\tString name = scanner.next();\n+\t\tparticipant.setName(name);\n+\t\tfor (Question question : questionList) {\n+\n+\t\t\tSystem.out.println(question.getQuestion());\n+\t\t\tquestionsAnswered.add(scanner.next());\n+\n+\t\t}\n+\t\tparticipant.setQuestionAnswered(questionsAnswered);\n+\t\tparticipantList.add(participant);\n+\n+\t\tSystem.out.println(\"do u want to continue?y/n\");\n+\t\tif (scanner.next().equals(\"y\")) {\n+\t\t\tSystem.out.print(\"hello\");\n+\n+\t\t\treturn inputProcess(questionList);","path":"OOP/assignment2/SurveyApplication.java","position":80,"original_position":80,"commit_id":"5304087860d1a0569ceb7fd6d0f08ef6413eaa29","original_commit_id":"5304087860d1a0569ceb7fd6d0f08ef6413eaa29","user":{"login":"nikhil-b","id":13694335,"avatar_url":"https://avatars.githubusercontent.com/u/13694335?v=3","gravatar_id":"","url":"https://api.github.com/users/nikhil-b","html_url":"https://github.com/nikhil-b","followers_url":"https://api.github.com/users/nikhil-b/followers","following_url":"https://api.github.com/users/nikhil-b/following{/other_user}","gists_url":"https://api.github.com/users/nikhil-b/gists{/gist_id}","starred_url":"https://api.github.com/users/nikhil-b/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nikhil-b/subscriptions","organizations_url":"https://api.github.com/users/nikhil-b/orgs","repos_url":"https://api.github.com/users/nikhil-b/repos","events_url":"https://api.github.com/users/nikhil-b/events{/privacy}","received_events_url":"https://api.github.com/users/nikhil-b/received_events","type":"User","site_admin":false},"body":"ACTION: Why recursion? for simple iterations we should never use recursion because it is an overhead to the JVM. This could be simple done by a while-loop what u were doing earlier. The recursion is not providing any extra feature.","created_at":"2015-08-18T04:16:20Z","updated_at":"2015-08-18T04:16:20Z","html_url":"https://github.com/meta-udit-nagar/get2015/pull/6#discussion_r37262952","pull_request_url":"https://api.github.com/repos/meta-udit-nagar/get2015/pulls/6","_links":{"self":{"href":"https://api.github.com/repos/meta-udit-nagar/get2015/pulls/comments/37262952"},"html":{"href":"https://github.com/meta-udit-nagar/get2015/pull/6#discussion_r37262952"},"pull_request":{"href":"https://api.github.com/repos/meta-udit-nagar/get2015/pulls/6"}}},"pull_request":{"url":"https://api.github.com/repos/meta-udit-nagar/get2015/pulls/6","id":42462915,"html_url":"https://github.com/meta-udit-nagar/get2015/pull/6","diff_url":"https://github.com/meta-udit-nagar/get2015/pull/6.diff","patch_url":"https://github.com/meta-udit-nagar/get2015/pull/6.patch","issue_url":"https://api.github.com/repos/meta-udit-nagar/get2015/issues/6","number":6,"state":"open","locked":false,"title":"assignment 2","user":{"login":"meta-udit-nagar","id":13659030,"avatar_url":"https://avatars.githubusercontent.com/u/13659030?v=3","gravatar_id":"","url":"https://api.github.com/users/meta-udit-nagar","html_url":"https://github.com/meta-udit-nagar","followers_url":"https://api.github.com/users/meta-udit-nagar/followers","following_url":"https://api.github.com/users/meta-udit-nagar/following{/other_user}","gists_url":"https://api.github.com/users/meta-udit-nagar/gists{/gist_id}","starred_url":"https://api.github.com/users/meta-udit-nagar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/meta-udit-nagar/subscriptions","organizations_url":"https://api.github.com/users/meta-udit-nagar/orgs","repos_url":"https://api.github.com/users/meta-udit-nagar/repos","events_url":"https://api.github.com/users/meta-udit-nagar/events{/privacy}","received_events_url":"https://api.github.com/users/meta-udit-nagar/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-08-14T14:44:32Z","updated_at":"2015-08-18T04:16:20Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ba6540120a71b45faba4235fd4e44b9efc93efe3","assignee":{"login":"nikhil-b","id":13694335,"avatar_url":"https://avatars.githubusercontent.com/u/13694335?v=3","gravatar_id":"","url":"https://api.github.com/users/nikhil-b","html_url":"https://github.com/nikhil-b","followers_url":"https://api.github.com/users/nikhil-b/followers","following_url":"https://api.github.com/users/nikhil-b/following{/other_user}","gists_url":"https://api.github.com/users/nikhil-b/gists{/gist_id}","starred_url":"https://api.github.com/users/nikhil-b/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nikhil-b/subscriptions","organizations_url":"https://api.github.com/users/nikhil-b/orgs","repos_url":"https://api.github.com/users/nikhil-b/repos","events_url":"https://api.github.com/users/nikhil-b/events{/privacy}","received_events_url":"https://api.github.com/users/nikhil-b/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/meta-udit-nagar/get2015/pulls/6/commits","review_comments_url":"https://api.github.com/repos/meta-udit-nagar/get2015/pulls/6/comments","review_comment_url":"https://api.github.com/repos/meta-udit-nagar/get2015/pulls/comments{/number}","comments_url":"https://api.github.com/repos/meta-udit-nagar/get2015/issues/6/comments","statuses_url":"https://api.github.com/repos/meta-udit-nagar/get2015/statuses/5304087860d1a0569ceb7fd6d0f08ef6413eaa29","head":{"label":"meta-udit-nagar:OOP-udit-assignment-2","ref":"OOP-udit-assignment-2","sha":"5304087860d1a0569ceb7fd6d0f08ef6413eaa29","user":{"login":"meta-udit-nagar","id":13659030,"avatar_url":"https://avatars.githubusercontent.com/u/13659030?v=3","gravatar_id":"","url":"https://api.github.com/users/meta-udit-nagar","html_url":"https://github.com/meta-udit-nagar","followers_url":"https://api.github.com/users/meta-udit-nagar/followers","following_url":"https://api.github.com/users/meta-udit-nagar/following{/other_user}","gists_url":"https://api.github.com/users/meta-udit-nagar/gists{/gist_id}","starred_url":"https://api.github.com/users/meta-udit-nagar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/meta-udit-nagar/subscriptions","organizations_url":"https://api.github.com/users/meta-udit-nagar/orgs","repos_url":"https://api.github.com/users/meta-udit-nagar/repos","events_url":"https://api.github.com/users/meta-udit-nagar/events{/privacy}","received_events_url":"https://api.github.com/users/meta-udit-nagar/received_events","type":"User","site_admin":false},"repo":{"id":40349620,"name":"get2015","full_name":"meta-udit-nagar/get2015","owner":{"login":"meta-udit-nagar","id":13659030,"avatar_url":"https://avatars.githubusercontent.com/u/13659030?v=3","gravatar_id":"","url":"https://api.github.com/users/meta-udit-nagar","html_url":"https://github.com/meta-udit-nagar","followers_url":"https://api.github.com/users/meta-udit-nagar/followers","following_url":"https://api.github.com/users/meta-udit-nagar/following{/other_user}","gists_url":"https://api.github.com/users/meta-udit-nagar/gists{/gist_id}","starred_url":"https://api.github.com/users/meta-udit-nagar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/meta-udit-nagar/subscriptions","organizations_url":"https://api.github.com/users/meta-udit-nagar/orgs","repos_url":"https://api.github.com/users/meta-udit-nagar/repos","events_url":"https://api.github.com/users/meta-udit-nagar/events{/privacy}","received_events_url":"https://api.github.com/users/meta-udit-nagar/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/meta-udit-nagar/get2015","description":"Training repo for GET 2015 batch","fork":true,"url":"https://api.github.com/repos/meta-udit-nagar/get2015","forks_url":"https://api.github.com/repos/meta-udit-nagar/get2015/forks","keys_url":"https://api.github.com/repos/meta-udit-nagar/get2015/keys{/key_id}","collaborators_url":"https://api.github.com/repos/meta-udit-nagar/get2015/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/meta-udit-nagar/get2015/teams","hooks_url":"https://api.github.com/repos/meta-udit-nagar/get2015/hooks","issue_events_url":"https://api.github.com/repos/meta-udit-nagar/get2015/issues/events{/number}","events_url":"https://api.github.com/repos/meta-udit-nagar/get2015/events","assignees_url":"https://api.github.com/repos/meta-udit-nagar/get2015/assignees{/user}","branches_url":"https://api.github.com/repos/meta-udit-nagar/get2015/branches{/branch}","tags_url":"https://api.github.com/repos/meta-udit-nagar/get2015/tags","blobs_url":"https://api.github.com/repos/meta-udit-nagar/get2015/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/meta-udit-nagar/get2015/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/meta-udit-nagar/get2015/git/refs{/sha}","trees_url":"https://api.github.com/repos/meta-udit-nagar/get2015/git/trees{/sha}","statuses_url":"https://api.github.com/repos/meta-udit-nagar/get2015/statuses/{sha}","languages_url":"https://api.github.com/repos/meta-udit-nagar/get2015/languages","stargazers_url":"https://api.github.com/repos/meta-udit-nagar/get2015/stargazers","contributors_url":"https://api.github.com/repos/meta-udit-nagar/get2015/contributors","subscribers_url":"https://api.github.com/repos/meta-udit-nagar/get2015/subscribers","subscription_url":"https://api.github.com/repos/meta-udit-nagar/get2015/subscription","commits_url":"https://api.github.com/repos/meta-udit-nagar/get2015/commits{/sha}","git_commits_url":"https://api.github.com/repos/meta-udit-nagar/get2015/git/commits{/sha}","comments_url":"https://api.github.com/repos/meta-udit-nagar/get2015/comments{/number}","issue_comment_url":"https://api.github.com/repos/meta-udit-nagar/get2015/issues/comments{/number}","contents_url":"https://api.github.com/repos/meta-udit-nagar/get2015/contents/{+path}","compare_url":"https://api.github.com/repos/meta-udit-nagar/get2015/compare/{base}...{head}","merges_url":"https://api.github.com/repos/meta-udit-nagar/get2015/merges","archive_url":"https://api.github.com/repos/meta-udit-nagar/get2015/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/meta-udit-nagar/get2015/downloads","issues_url":"https://api.github.com/repos/meta-udit-nagar/get2015/issues{/number}","pulls_url":"https://api.github.com/repos/meta-udit-nagar/get2015/pulls{/number}","milestones_url":"https://api.github.com/repos/meta-udit-nagar/get2015/milestones{/number}","notifications_url":"https://api.github.com/repos/meta-udit-nagar/get2015/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/meta-udit-nagar/get2015/labels{/name}","releases_url":"https://api.github.com/repos/meta-udit-nagar/get2015/releases{/id}","created_at":"2015-08-07T08:21:40Z","updated_at":"2015-08-07T11:23:09Z","pushed_at":"2015-08-17T16:42:00Z","git_url":"git://github.com/meta-udit-nagar/get2015.git","ssh_url":"git@github.com:meta-udit-nagar/get2015.git","clone_url":"https://github.com/meta-udit-nagar/get2015.git","svn_url":"https://github.com/meta-udit-nagar/get2015","homepage":null,"size":358,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":6,"forks":0,"open_issues":6,"watchers":0,"default_branch":"master"}},"base":{"label":"meta-udit-nagar:master","ref":"master","sha":"e52a6c4ff8198a2f43d5b4cfa46944c6f4686dfe","user":{"login":"meta-udit-nagar","id":13659030,"avatar_url":"https://avatars.githubusercontent.com/u/13659030?v=3","gravatar_id":"","url":"https://api.github.com/users/meta-udit-nagar","html_url":"https://github.com/meta-udit-nagar","followers_url":"https://api.github.com/users/meta-udit-nagar/followers","following_url":"https://api.github.com/users/meta-udit-nagar/following{/other_user}","gists_url":"https://api.github.com/users/meta-udit-nagar/gists{/gist_id}","starred_url":"https://api.github.com/users/meta-udit-nagar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/meta-udit-nagar/subscriptions","organizations_url":"https://api.github.com/users/meta-udit-nagar/orgs","repos_url":"https://api.github.com/users/meta-udit-nagar/repos","events_url":"https://api.github.com/users/meta-udit-nagar/events{/privacy}","received_events_url":"https://api.github.com/users/meta-udit-nagar/received_events","type":"User","site_admin":false},"repo":{"id":40349620,"name":"get2015","full_name":"meta-udit-nagar/get2015","owner":{"login":"meta-udit-nagar","id":13659030,"avatar_url":"https://avatars.githubusercontent.com/u/13659030?v=3","gravatar_id":"","url":"https://api.github.com/users/meta-udit-nagar","html_url":"https://github.com/meta-udit-nagar","followers_url":"https://api.github.com/users/meta-udit-nagar/followers","following_url":"https://api.github.com/users/meta-udit-nagar/following{/other_user}","gists_url":"https://api.github.com/users/meta-udit-nagar/gists{/gist_id}","starred_url":"https://api.github.com/users/meta-udit-nagar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/meta-udit-nagar/subscriptions","organizations_url":"https://api.github.com/users/meta-udit-nagar/orgs","repos_url":"https://api.github.com/users/meta-udit-nagar/repos","events_url":"https://api.github.com/users/meta-udit-nagar/events{/privacy}","received_events_url":"https://api.github.com/users/meta-udit-nagar/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/meta-udit-nagar/get2015","description":"Training repo for GET 2015 batch","fork":true,"url":"https://api.github.com/repos/meta-udit-nagar/get2015","forks_url":"https://api.github.com/repos/meta-udit-nagar/get2015/forks","keys_url":"https://api.github.com/repos/meta-udit-nagar/get2015/keys{/key_id}","collaborators_url":"https://api.github.com/repos/meta-udit-nagar/get2015/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/meta-udit-nagar/get2015/teams","hooks_url":"https://api.github.com/repos/meta-udit-nagar/get2015/hooks","issue_events_url":"https://api.github.com/repos/meta-udit-nagar/get2015/issues/events{/number}","events_url":"https://api.github.com/repos/meta-udit-nagar/get2015/events","assignees_url":"https://api.github.com/repos/meta-udit-nagar/get2015/assignees{/user}","branches_url":"https://api.github.com/repos/meta-udit-nagar/get2015/branches{/branch}","tags_url":"https://api.github.com/repos/meta-udit-nagar/get2015/tags","blobs_url":"https://api.github.com/repos/meta-udit-nagar/get2015/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/meta-udit-nagar/get2015/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/meta-udit-nagar/get2015/git/refs{/sha}","trees_url":"https://api.github.com/repos/meta-udit-nagar/get2015/git/trees{/sha}","statuses_url":"https://api.github.com/repos/meta-udit-nagar/get2015/statuses/{sha}","languages_url":"https://api.github.com/repos/meta-udit-nagar/get2015/languages","stargazers_url":"https://api.github.com/repos/meta-udit-nagar/get2015/stargazers","contributors_url":"https://api.github.com/repos/meta-udit-nagar/get2015/contributors","subscribers_url":"https://api.github.com/repos/meta-udit-nagar/get2015/subscribers","subscription_url":"https://api.github.com/repos/meta-udit-nagar/get2015/subscription","commits_url":"https://api.github.com/repos/meta-udit-nagar/get2015/commits{/sha}","git_commits_url":"https://api.github.com/repos/meta-udit-nagar/get2015/git/commits{/sha}","comments_url":"https://api.github.com/repos/meta-udit-nagar/get2015/comments{/number}","issue_comment_url":"https://api.github.com/repos/meta-udit-nagar/get2015/issues/comments{/number}","contents_url":"https://api.github.com/repos/meta-udit-nagar/get2015/contents/{+path}","compare_url":"https://api.github.com/repos/meta-udit-nagar/get2015/compare/{base}...{head}","merges_url":"https://api.github.com/repos/meta-udit-nagar/get2015/merges","archive_url":"https://api.github.com/repos/meta-udit-nagar/get2015/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/meta-udit-nagar/get2015/downloads","issues_url":"https://api.github.com/repos/meta-udit-nagar/get2015/issues{/number}","pulls_url":"https://api.github.com/repos/meta-udit-nagar/get2015/pulls{/number}","milestones_url":"https://api.github.com/repos/meta-udit-nagar/get2015/milestones{/number}","notifications_url":"https://api.github.com/repos/meta-udit-nagar/get2015/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/meta-udit-nagar/get2015/labels{/name}","releases_url":"https://api.github.com/repos/meta-udit-nagar/get2015/releases{/id}","created_at":"2015-08-07T08:21:40Z","updated_at":"2015-08-07T11:23:09Z","pushed_at":"2015-08-17T16:42:00Z","git_url":"git://github.com/meta-udit-nagar/get2015.git","ssh_url":"git@github.com:meta-udit-nagar/get2015.git","clone_url":"https://github.com/meta-udit-nagar/get2015.git","svn_url":"https://github.com/meta-udit-nagar/get2015","homepage":null,"size":358,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":6,"forks":0,"open_issues":6,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/meta-udit-nagar/get2015/pulls/6"},"html":{"href":"https://github.com/meta-udit-nagar/get2015/pull/6"},"issue":{"href":"https://api.github.com/repos/meta-udit-nagar/get2015/issues/6"},"comments":{"href":"https://api.github.com/repos/meta-udit-nagar/get2015/issues/6/comments"},"review_comments":{"href":"https://api.github.com/repos/meta-udit-nagar/get2015/pulls/6/comments"},"review_comment":{"href":"https://api.github.com/repos/meta-udit-nagar/get2015/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/meta-udit-nagar/get2015/pulls/6/commits"},"statuses":{"href":"https://api.github.com/repos/meta-udit-nagar/get2015/statuses/5304087860d1a0569ceb7fd6d0f08ef6413eaa29"}}}}