{"action":"created","comment":{"url":"https://api.github.com/repos/se-edu/addressbook-level2/pulls/comments/74713693","id":74713693,"diff_hunk":"@@ -1,160 +1,140 @@\n package seedu.addressbook;\n \n-import static seedu.addressbook.TextUi.*;\n-import static seedu.addressbook.storage.StorageFile.*;\n+import seedu.addressbook.model.person.ReadOnlyPerson;\n+import seedu.addressbook.storage.StorageFile.*;\n \n import seedu.addressbook.commands.*;\n import seedu.addressbook.model.AddressBook;\n import seedu.addressbook.parser.Parser;\n import seedu.addressbook.storage.StorageFile;\n+import seedu.addressbook.ui.TextUi;\n \n import java.io.*;\n+import java.util.List;\n \n-/* ==============NOTE TO STUDENTS======================================\n- * This class header comment below is brief because details of how to\n- * use this class are documented elsewhere.\n- * ====================================================================\n- */\n \n /**\n  * Entry point of the address book application.\n- * Contains command execution logic; initialises and uses the different components.\n+ * Initializes the application and starts the interaction with the user.\n  */\n public class Main {\n \n     /**\n-     * Default file path used if the user doesn't provide the file name.\n+     * Version info of the program.\n      */\n-    public static final String DEFAULT_STORAGE_FILEPATH = \"addressbook.txt\";\n+    public static final String VERSION = \"AddessBook Level 2 - Version 1.0\";\n \n-    /**\n-     * These message is not in the TextUi class because program launch and initialisation messages may be shown\n-     * outside the given UI (should be logged at launch console), and needs to be shown before the UI is ready.\n-     */\n-    public static final String MESSAGE_PROGRAM_LAUNCH_ARGS_USAGE = \"Launch arguments format: [STORAGE_FILE_PATH]\";\n-    public static final String MESSAGE_INIT_FAILED = \"Failed to initialise address book application. Exiting...\";\n+    private TextUi ui;\n+    private StorageFile storage;\n+    private AddressBook addressBook;\n \n     /**\n-     * Version info of the program.\n+     * The list of person shown to the user most recently.\n      */\n-    public static final String VERSION = \"AddessBook Level 1 - Version 1.0\";\n+    private List<? extends ReadOnlyPerson> lastShownList = null;","path":"src/seedu/addressbook/Main.java","position":52,"original_position":52,"commit_id":"12abc3567512895c7e67cf4075f6083635606ace","original_commit_id":"12abc3567512895c7e67cf4075f6083635606ace","user":{"login":"damithc","id":1673303,"avatar_url":"https://avatars.githubusercontent.com/u/1673303?v=3","gravatar_id":"","url":"https://api.github.com/users/damithc","html_url":"https://github.com/damithc","followers_url":"https://api.github.com/users/damithc/followers","following_url":"https://api.github.com/users/damithc/following{/other_user}","gists_url":"https://api.github.com/users/damithc/gists{/gist_id}","starred_url":"https://api.github.com/users/damithc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/damithc/subscriptions","organizations_url":"https://api.github.com/users/damithc/orgs","repos_url":"https://api.github.com/users/damithc/repos","events_url":"https://api.github.com/users/damithc/events{/privacy}","received_events_url":"https://api.github.com/users/damithc/received_events","type":"User","site_admin":false},"body":"I wonder if this is the right datatype.  Feels like it is too low level. We can encapsulate it into another class at a later stage (not very important)","created_at":"2016-08-15T01:38:52Z","updated_at":"2016-08-15T01:38:52Z","html_url":"https://github.com/se-edu/addressbook-level2/pull/14#discussion_r74713693","pull_request_url":"https://api.github.com/repos/se-edu/addressbook-level2/pulls/14","_links":{"self":{"href":"https://api.github.com/repos/se-edu/addressbook-level2/pulls/comments/74713693"},"html":{"href":"https://github.com/se-edu/addressbook-level2/pull/14#discussion_r74713693"},"pull_request":{"href":"https://api.github.com/repos/se-edu/addressbook-level2/pulls/14"}}},"pull_request":{"url":"https://api.github.com/repos/se-edu/addressbook-level2/pulls/14","id":81247968,"html_url":"https://github.com/se-edu/addressbook-level2/pull/14","diff_url":"https://github.com/se-edu/addressbook-level2/pull/14.diff","patch_url":"https://github.com/se-edu/addressbook-level2/pull/14.patch","issue_url":"https://api.github.com/repos/se-edu/addressbook-level2/issues/14","number":14,"state":"open","locked":false,"title":"Minor cleanups to Main class and Command classes","user":{"login":"damithc","id":1673303,"avatar_url":"https://avatars.githubusercontent.com/u/1673303?v=3","gravatar_id":"","url":"https://api.github.com/users/damithc","html_url":"https://github.com/damithc","followers_url":"https://api.github.com/users/damithc/followers","following_url":"https://api.github.com/users/damithc/following{/other_user}","gists_url":"https://api.github.com/users/damithc/gists{/gist_id}","starred_url":"https://api.github.com/users/damithc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/damithc/subscriptions","organizations_url":"https://api.github.com/users/damithc/orgs","repos_url":"https://api.github.com/users/damithc/repos","events_url":"https://api.github.com/users/damithc/events{/privacy}","received_events_url":"https://api.github.com/users/damithc/received_events","type":"User","site_admin":false},"body":"* reduced unnecessary coupling to TextUi \r\n* made Main class simpler","created_at":"2016-08-14T16:28:55Z","updated_at":"2016-08-15T01:38:52Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1fd3e9d908bf284c4180dc828011b2d2ca4a4c89","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/se-edu/addressbook-level2/pulls/14/commits","review_comments_url":"https://api.github.com/repos/se-edu/addressbook-level2/pulls/14/comments","review_comment_url":"https://api.github.com/repos/se-edu/addressbook-level2/pulls/comments{/number}","comments_url":"https://api.github.com/repos/se-edu/addressbook-level2/issues/14/comments","statuses_url":"https://api.github.com/repos/se-edu/addressbook-level2/statuses/12abc3567512895c7e67cf4075f6083635606ace","head":{"label":"se-edu:minor-cleanups","ref":"minor-cleanups","sha":"12abc3567512895c7e67cf4075f6083635606ace","user":{"login":"se-edu","id":20763652,"avatar_url":"https://avatars.githubusercontent.com/u/20763652?v=3","gravatar_id":"","url":"https://api.github.com/users/se-edu","html_url":"https://github.com/se-edu","followers_url":"https://api.github.com/users/se-edu/followers","following_url":"https://api.github.com/users/se-edu/following{/other_user}","gists_url":"https://api.github.com/users/se-edu/gists{/gist_id}","starred_url":"https://api.github.com/users/se-edu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/se-edu/subscriptions","organizations_url":"https://api.github.com/users/se-edu/orgs","repos_url":"https://api.github.com/users/se-edu/repos","events_url":"https://api.github.com/users/se-edu/events{/privacy}","received_events_url":"https://api.github.com/users/se-edu/received_events","type":"Organization","site_admin":false},"repo":{"id":63947541,"name":"addressbook-level2","full_name":"se-edu/addressbook-level2","owner":{"login":"se-edu","id":20763652,"avatar_url":"https://avatars.githubusercontent.com/u/20763652?v=3","gravatar_id":"","url":"https://api.github.com/users/se-edu","html_url":"https://github.com/se-edu","followers_url":"https://api.github.com/users/se-edu/followers","following_url":"https://api.github.com/users/se-edu/following{/other_user}","gists_url":"https://api.github.com/users/se-edu/gists{/gist_id}","starred_url":"https://api.github.com/users/se-edu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/se-edu/subscriptions","organizations_url":"https://api.github.com/users/se-edu/orgs","repos_url":"https://api.github.com/users/se-edu/repos","events_url":"https://api.github.com/users/se-edu/events{/privacy}","received_events_url":"https://api.github.com/users/se-edu/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/se-edu/addressbook-level2","description":"A Java sample application for students. An AddressBook application that uses OOP basics.","fork":false,"url":"https://api.github.com/repos/se-edu/addressbook-level2","forks_url":"https://api.github.com/repos/se-edu/addressbook-level2/forks","keys_url":"https://api.github.com/repos/se-edu/addressbook-level2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/se-edu/addressbook-level2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/se-edu/addressbook-level2/teams","hooks_url":"https://api.github.com/repos/se-edu/addressbook-level2/hooks","issue_events_url":"https://api.github.com/repos/se-edu/addressbook-level2/issues/events{/number}","events_url":"https://api.github.com/repos/se-edu/addressbook-level2/events","assignees_url":"https://api.github.com/repos/se-edu/addressbook-level2/assignees{/user}","branches_url":"https://api.github.com/repos/se-edu/addressbook-level2/branches{/branch}","tags_url":"https://api.github.com/repos/se-edu/addressbook-level2/tags","blobs_url":"https://api.github.com/repos/se-edu/addressbook-level2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/se-edu/addressbook-level2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/se-edu/addressbook-level2/git/refs{/sha}","trees_url":"https://api.github.com/repos/se-edu/addressbook-level2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/se-edu/addressbook-level2/statuses/{sha}","languages_url":"https://api.github.com/repos/se-edu/addressbook-level2/languages","stargazers_url":"https://api.github.com/repos/se-edu/addressbook-level2/stargazers","contributors_url":"https://api.github.com/repos/se-edu/addressbook-level2/contributors","subscribers_url":"https://api.github.com/repos/se-edu/addressbook-level2/subscribers","subscription_url":"https://api.github.com/repos/se-edu/addressbook-level2/subscription","commits_url":"https://api.github.com/repos/se-edu/addressbook-level2/commits{/sha}","git_commits_url":"https://api.github.com/repos/se-edu/addressbook-level2/git/commits{/sha}","comments_url":"https://api.github.com/repos/se-edu/addressbook-level2/comments{/number}","issue_comment_url":"https://api.github.com/repos/se-edu/addressbook-level2/issues/comments{/number}","contents_url":"https://api.github.com/repos/se-edu/addressbook-level2/contents/{+path}","compare_url":"https://api.github.com/repos/se-edu/addressbook-level2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/se-edu/addressbook-level2/merges","archive_url":"https://api.github.com/repos/se-edu/addressbook-level2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/se-edu/addressbook-level2/downloads","issues_url":"https://api.github.com/repos/se-edu/addressbook-level2/issues{/number}","pulls_url":"https://api.github.com/repos/se-edu/addressbook-level2/pulls{/number}","milestones_url":"https://api.github.com/repos/se-edu/addressbook-level2/milestones{/number}","notifications_url":"https://api.github.com/repos/se-edu/addressbook-level2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/se-edu/addressbook-level2/labels{/name}","releases_url":"https://api.github.com/repos/se-edu/addressbook-level2/releases{/id}","deployments_url":"https://api.github.com/repos/se-edu/addressbook-level2/deployments","created_at":"2016-07-22T11:11:54Z","updated_at":"2016-08-01T09:11:43Z","pushed_at":"2016-08-14T16:28:55Z","git_url":"git://github.com/se-edu/addressbook-level2.git","ssh_url":"git@github.com:se-edu/addressbook-level2.git","clone_url":"https://github.com/se-edu/addressbook-level2.git","svn_url":"https://github.com/se-edu/addressbook-level2","homepage":null,"size":2653,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":3,"forks":0,"open_issues":3,"watchers":0,"default_branch":"master"}},"base":{"label":"se-edu:master","ref":"master","sha":"ae278ae49a841825c538fde0071256ed4cb60354","user":{"login":"se-edu","id":20763652,"avatar_url":"https://avatars.githubusercontent.com/u/20763652?v=3","gravatar_id":"","url":"https://api.github.com/users/se-edu","html_url":"https://github.com/se-edu","followers_url":"https://api.github.com/users/se-edu/followers","following_url":"https://api.github.com/users/se-edu/following{/other_user}","gists_url":"https://api.github.com/users/se-edu/gists{/gist_id}","starred_url":"https://api.github.com/users/se-edu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/se-edu/subscriptions","organizations_url":"https://api.github.com/users/se-edu/orgs","repos_url":"https://api.github.com/users/se-edu/repos","events_url":"https://api.github.com/users/se-edu/events{/privacy}","received_events_url":"https://api.github.com/users/se-edu/received_events","type":"Organization","site_admin":false},"repo":{"id":63947541,"name":"addressbook-level2","full_name":"se-edu/addressbook-level2","owner":{"login":"se-edu","id":20763652,"avatar_url":"https://avatars.githubusercontent.com/u/20763652?v=3","gravatar_id":"","url":"https://api.github.com/users/se-edu","html_url":"https://github.com/se-edu","followers_url":"https://api.github.com/users/se-edu/followers","following_url":"https://api.github.com/users/se-edu/following{/other_user}","gists_url":"https://api.github.com/users/se-edu/gists{/gist_id}","starred_url":"https://api.github.com/users/se-edu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/se-edu/subscriptions","organizations_url":"https://api.github.com/users/se-edu/orgs","repos_url":"https://api.github.com/users/se-edu/repos","events_url":"https://api.github.com/users/se-edu/events{/privacy}","received_events_url":"https://api.github.com/users/se-edu/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/se-edu/addressbook-level2","description":"A Java sample application for students. An AddressBook application that uses OOP basics.","fork":false,"url":"https://api.github.com/repos/se-edu/addressbook-level2","forks_url":"https://api.github.com/repos/se-edu/addressbook-level2/forks","keys_url":"https://api.github.com/repos/se-edu/addressbook-level2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/se-edu/addressbook-level2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/se-edu/addressbook-level2/teams","hooks_url":"https://api.github.com/repos/se-edu/addressbook-level2/hooks","issue_events_url":"https://api.github.com/repos/se-edu/addressbook-level2/issues/events{/number}","events_url":"https://api.github.com/repos/se-edu/addressbook-level2/events","assignees_url":"https://api.github.com/repos/se-edu/addressbook-level2/assignees{/user}","branches_url":"https://api.github.com/repos/se-edu/addressbook-level2/branches{/branch}","tags_url":"https://api.github.com/repos/se-edu/addressbook-level2/tags","blobs_url":"https://api.github.com/repos/se-edu/addressbook-level2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/se-edu/addressbook-level2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/se-edu/addressbook-level2/git/refs{/sha}","trees_url":"https://api.github.com/repos/se-edu/addressbook-level2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/se-edu/addressbook-level2/statuses/{sha}","languages_url":"https://api.github.com/repos/se-edu/addressbook-level2/languages","stargazers_url":"https://api.github.com/repos/se-edu/addressbook-level2/stargazers","contributors_url":"https://api.github.com/repos/se-edu/addressbook-level2/contributors","subscribers_url":"https://api.github.com/repos/se-edu/addressbook-level2/subscribers","subscription_url":"https://api.github.com/repos/se-edu/addressbook-level2/subscription","commits_url":"https://api.github.com/repos/se-edu/addressbook-level2/commits{/sha}","git_commits_url":"https://api.github.com/repos/se-edu/addressbook-level2/git/commits{/sha}","comments_url":"https://api.github.com/repos/se-edu/addressbook-level2/comments{/number}","issue_comment_url":"https://api.github.com/repos/se-edu/addressbook-level2/issues/comments{/number}","contents_url":"https://api.github.com/repos/se-edu/addressbook-level2/contents/{+path}","compare_url":"https://api.github.com/repos/se-edu/addressbook-level2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/se-edu/addressbook-level2/merges","archive_url":"https://api.github.com/repos/se-edu/addressbook-level2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/se-edu/addressbook-level2/downloads","issues_url":"https://api.github.com/repos/se-edu/addressbook-level2/issues{/number}","pulls_url":"https://api.github.com/repos/se-edu/addressbook-level2/pulls{/number}","milestones_url":"https://api.github.com/repos/se-edu/addressbook-level2/milestones{/number}","notifications_url":"https://api.github.com/repos/se-edu/addressbook-level2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/se-edu/addressbook-level2/labels{/name}","releases_url":"https://api.github.com/repos/se-edu/addressbook-level2/releases{/id}","deployments_url":"https://api.github.com/repos/se-edu/addressbook-level2/deployments","created_at":"2016-07-22T11:11:54Z","updated_at":"2016-08-01T09:11:43Z","pushed_at":"2016-08-14T16:28:55Z","git_url":"git://github.com/se-edu/addressbook-level2.git","ssh_url":"git@github.com:se-edu/addressbook-level2.git","clone_url":"https://github.com/se-edu/addressbook-level2.git","svn_url":"https://github.com/se-edu/addressbook-level2","homepage":null,"size":2653,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":3,"forks":0,"open_issues":3,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/se-edu/addressbook-level2/pulls/14"},"html":{"href":"https://github.com/se-edu/addressbook-level2/pull/14"},"issue":{"href":"https://api.github.com/repos/se-edu/addressbook-level2/issues/14"},"comments":{"href":"https://api.github.com/repos/se-edu/addressbook-level2/issues/14/comments"},"review_comments":{"href":"https://api.github.com/repos/se-edu/addressbook-level2/pulls/14/comments"},"review_comment":{"href":"https://api.github.com/repos/se-edu/addressbook-level2/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/se-edu/addressbook-level2/pulls/14/commits"},"statuses":{"href":"https://api.github.com/repos/se-edu/addressbook-level2/statuses/12abc3567512895c7e67cf4075f6083635606ace"}}}}
{"actor":{"display_login":"damithc"}}