{"action":"opened","issue":{"url":"https://api.github.com/repos/TIY-Charleston-Back-End-Oct2015/assignments/issues/30","labels_url":"https://api.github.com/repos/TIY-Charleston-Back-End-Oct2015/assignments/issues/30/labels{/name}","comments_url":"https://api.github.com/repos/TIY-Charleston-Back-End-Oct2015/assignments/issues/30/comments","events_url":"https://api.github.com/repos/TIY-Charleston-Back-End-Oct2015/assignments/issues/30/events","html_url":"https://github.com/TIY-Charleston-Back-End-Oct2015/assignments/issues/30","id":110500440,"number":30,"title":"1.3","user":{"login":"cpoakley1432","id":14876845,"avatar_url":"https://avatars.githubusercontent.com/u/14876845?v=3","gravatar_id":"","url":"https://api.github.com/users/cpoakley1432","html_url":"https://github.com/cpoakley1432","followers_url":"https://api.github.com/users/cpoakley1432/followers","following_url":"https://api.github.com/users/cpoakley1432/following{/other_user}","gists_url":"https://api.github.com/users/cpoakley1432/gists{/gist_id}","starred_url":"https://api.github.com/users/cpoakley1432/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cpoakley1432/subscriptions","organizations_url":"https://api.github.com/users/cpoakley1432/orgs","repos_url":"https://api.github.com/users/cpoakley1432/repos","events_url":"https://api.github.com/users/cpoakley1432/events{/privacy}","received_events_url":"https://api.github.com/users/cpoakley1432/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-10-08T17:11:15Z","updated_at":"2015-10-08T17:11:15Z","closed_at":null,"body":"/**\r\n * Created by cameronoakley on 10/8/15.\r\n */\r\npublic class ATM {\r\n    public static void run() throws Exception {\r\n        System.out.println(\"Welcome to City Bank\");\r\n        System.out.println(\"What is your name?\");\r\n\r\n        Scanner scanner = new Scanner(System.in);\r\n        String name = scanner.nextLine();\r\n        if (name.equals(\"\"))\r\n            throw new Exception(\"Invalid name.\");\r\n\r\n        System.out.println(\"[1] Check my balance\");\r\n        System.out.println(\"[2] Withdraw Funds\");\r\n        System.out.println(\"[3] Cancel \");\r\n        String action = scanner.nextLine();\r\n        int actionNum = Integer.valueOf(action);\r\n        if (actionNum == 1) {\r\n            System.out.println(\"Your balance is $100\");\r\n        } else if (actionNum == 2) {\r\n            System.out.println(\"How much would you like to withdraw?\");\r\n            String withdraw = scanner.nextLine();\r\n            int withdrawNum = Integer.valueOf(withdraw);\r\n            if (withdrawNum > 100) {\r\n                throw new Exception(\"Not enough funds\");\r\n\r\n\r\n            } else if (withdrawNum < 100) {\r\n                System.out.println(\"Please take your money\");\r\n            }\r\n        } else if (actionNum == 3){\r\n            System.out.println(\"Thank you and please come again\");\r\n        }\r\n    }\r\n}"}}