{"action":"created","comment":{"url":"https://api.github.com/repos/FPGS/EDD/pulls/comments/55006319","id":55006319,"diff_hunk":"@@ -2,68 +2,210 @@\n \n import sun.reflect.generics.reflectiveObjects.NotImplementedException;\n \n+import java.util.ArrayList;\n import java.util.List;\n \n public class Calculator {\n \n+\tprivate static int resultado;\n \n \t/*\n-     * este metodo devuelve el Class del object que le pasamos\n-     */\n+\t * este metodo devuelve el Class del object que le pasamos\n+\t */\n \tpublic static Class classTypeOf(Object x) {\n-\t\tthrow  new NotImplementedException();\n-\t}\n \n+\t\treturn x.getClass();\n+\t\t// throw new NotImplementedException();\n+\t}\n \n \t/*\n-     * devuelve una lista con los n números de la serie de fibonacci.\n-     */\n+\t * devuelve una lista con los n números de la serie de fibonacci.\n+\t */\n \tpublic static List<Integer> fibonacci(int n) {\n-\t\tthrow  new NotImplementedException();\n+\t\tList<Integer> list = new ArrayList<Integer>();\n+\n+\t\tint anterior = 1;\n+\t\tint actual = 1;\n+\t\tlist.add(actual);\n+\t\tint siguiente = 1;\n+\t\tfor (int i = 1; i < n; i++) {\n+\t\t\tlist.add(actual);\n+\t\t\tsiguiente = actual + anterior;\n+\t\t\tanterior = actual;\n+\t\t\tactual = siguiente;\n+\t\t}\n+\t\tSystem.out.println(list);\n+\t\treturn list;\n \t}\n \n \t/*\n \t * Escribir todos los números del number al 0 de step en step.\n \t */\n \tpublic static int[] stepThisNumber(int number, int step) {\n-\t\tthrow  new NotImplementedException();\n+\n+\t\tint[] lista;\n+\t\tint cont = 0;\n+\t\tString nueva = \"\";\n+\t\tfor (int i = number - step; i > 0; i -= step) {\n+\t\t\tnueva += i;\n+\t\t\tcont++;\n+\t\t\t// number= resultado;\n+\t\t\t// resultado=number-step;\n+\t\t\t// int resultado = 0;\n+\t\t\t// step=-i\n+\t\t\t// numero = Integer.parseInt(cadena) cadena=\n+\t\t\t// Integer.toString(numero);int i = Integer.parseInt(s);\n \t\t}\n+\t\tlista = new int[cont];\n+\t\tfor (int n = 0; n < cont; n++) {\n+\t\t\tlista[n] = (nueva.charAt(n) - '0');\n+\n+\t\t}\n+\n+\t\treturn lista;\n+\t}\n \n \t/*\n \t * Módulo al que se le pasa un número entero del 0 al 20 y devuelve los\n \t * divisores que tiene.\n \t */\n \tpublic static int[] divisors(int n) {\n-\t\tthrow  new NotImplementedException();\n+\t\tif (n < 1) {\n+\t\t\treturn null;\n+\t\t}\n+\t\tint cont = 0;\n+\n+\t\tfor (int i = n; i > 0; i--) {\n+\t\t\tif (n % i == 0) {\n+\t\t\t\tcont++;\n+\n+\t\t\t}\n+\n+\t\t}\n+\t\tint[] divisores = new int[cont];\n+\t\tfor (int i = 1; i <= n; i++)\n+\t\t\tif (n % i == 0) {\n+\t\t\t\tcont--;\n+\t\t\t\tdivisores[cont] = i;\n+\t\t\t}\n+\n+\t\treturn divisores;\n+\n \t}\n \n \t/*\n-\t * Toma como parámetros una cadena de caracteres y devuelve cierto si la cadena resulta ser un palíndromo\n+\t * Toma como parámetros una cadena de caracteres y devuelve cierto si la\n+\t * cadena resulta ser un palíndromo palindrmo son las frases que se leen\n+\t * igual del dercho que del reves\n \t */\n \tpublic static boolean checkIsPalindrome(String cadena) {\n-\t\tthrow  new NotImplementedException();\n+\t\tif (cadena == null) {\n+\t\t\treturn false;\n+\n+\t\t}\n+\t\tcadena = cadena.toLowerCase();\n+\t\tString cadena2 = \"\";\n+\t\tString acentos = \"áàäéèëíìïóòöúùuñÁÀÄÉÈËÍÌÏÓÒÖÚÙÜÑçÇ\";\n+\t\tString sinacentos = \"aaaeeeiiiooouuunAAAEEEIIIOOOUUUNcC\";\n+\t\tfor (int i = 0; i < cadena.length(); i++) {\n+\t\t\tif (Character.isLetter(cadena.charAt(i))) {\n+\t\t\t\tif (acentos.indexOf(cadena.charAt(i)) != -1)","path":"FP/src/main/java/fp/Calculator.java","position":122,"original_position":122,"commit_id":"e3068a642bcd38a1ebf076c830e19109325f9e44","original_commit_id":"e3068a642bcd38a1ebf076c830e19109325f9e44","user":{"login":"JoTerrance","id":6041670,"avatar_url":"https://avatars.githubusercontent.com/u/6041670?v=3","gravatar_id":"","url":"https://api.github.com/users/JoTerrance","html_url":"https://github.com/JoTerrance","followers_url":"https://api.github.com/users/JoTerrance/followers","following_url":"https://api.github.com/users/JoTerrance/following{/other_user}","gists_url":"https://api.github.com/users/JoTerrance/gists{/gist_id}","starred_url":"https://api.github.com/users/JoTerrance/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JoTerrance/subscriptions","organizations_url":"https://api.github.com/users/JoTerrance/orgs","repos_url":"https://api.github.com/users/JoTerrance/repos","events_url":"https://api.github.com/users/JoTerrance/events{/privacy}","received_events_url":"https://api.github.com/users/JoTerrance/received_events","type":"User","site_admin":false},"body":"refa toriza en métodos....\r\n","created_at":"2016-03-04T09:15:58Z","updated_at":"2016-03-04T09:15:58Z","html_url":"https://github.com/FPGS/EDD/pull/39#discussion_r55006319","pull_request_url":"https://api.github.com/repos/FPGS/EDD/pulls/39","_links":{"self":{"href":"https://api.github.com/repos/FPGS/EDD/pulls/comments/55006319"},"html":{"href":"https://github.com/FPGS/EDD/pull/39#discussion_r55006319"},"pull_request":{"href":"https://api.github.com/repos/FPGS/EDD/pulls/39"}}},"pull_request":{"url":"https://api.github.com/repos/FPGS/EDD/pulls/39","id":61286458,"html_url":"https://github.com/FPGS/EDD/pull/39","diff_url":"https://github.com/FPGS/EDD/pull/39.diff","patch_url":"https://github.com/FPGS/EDD/pull/39.patch","issue_url":"https://api.github.com/repos/FPGS/EDD/issues/39","number":39,"state":"open","locked":false,"title":"Rubrica 12","user":{"login":"edu165","id":16117709,"avatar_url":"https://avatars.githubusercontent.com/u/16117709?v=3","gravatar_id":"","url":"https://api.github.com/users/edu165","html_url":"https://github.com/edu165","followers_url":"https://api.github.com/users/edu165/followers","following_url":"https://api.github.com/users/edu165/following{/other_user}","gists_url":"https://api.github.com/users/edu165/gists{/gist_id}","starred_url":"https://api.github.com/users/edu165/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edu165/subscriptions","organizations_url":"https://api.github.com/users/edu165/orgs","repos_url":"https://api.github.com/users/edu165/repos","events_url":"https://api.github.com/users/edu165/events{/privacy}","received_events_url":"https://api.github.com/users/edu165/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-03-01T18:30:34Z","updated_at":"2016-03-04T09:15:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":"872ad87f5e7a1c3b257354c19a7cc99f79c66c07","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/FPGS/EDD/pulls/39/commits","review_comments_url":"https://api.github.com/repos/FPGS/EDD/pulls/39/comments","review_comment_url":"https://api.github.com/repos/FPGS/EDD/pulls/comments{/number}","comments_url":"https://api.github.com/repos/FPGS/EDD/issues/39/comments","statuses_url":"https://api.github.com/repos/FPGS/EDD/statuses/e3068a642bcd38a1ebf076c830e19109325f9e44","head":{"label":"edu165:master","ref":"master","sha":"e3068a642bcd38a1ebf076c830e19109325f9e44","user":{"login":"edu165","id":16117709,"avatar_url":"https://avatars.githubusercontent.com/u/16117709?v=3","gravatar_id":"","url":"https://api.github.com/users/edu165","html_url":"https://github.com/edu165","followers_url":"https://api.github.com/users/edu165/followers","following_url":"https://api.github.com/users/edu165/following{/other_user}","gists_url":"https://api.github.com/users/edu165/gists{/gist_id}","starred_url":"https://api.github.com/users/edu165/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edu165/subscriptions","organizations_url":"https://api.github.com/users/edu165/orgs","repos_url":"https://api.github.com/users/edu165/repos","events_url":"https://api.github.com/users/edu165/events{/privacy}","received_events_url":"https://api.github.com/users/edu165/received_events","type":"User","site_admin":false},"repo":{"id":52440092,"name":"EDD","full_name":"edu165/EDD","owner":{"login":"edu165","id":16117709,"avatar_url":"https://avatars.githubusercontent.com/u/16117709?v=3","gravatar_id":"","url":"https://api.github.com/users/edu165","html_url":"https://github.com/edu165","followers_url":"https://api.github.com/users/edu165/followers","following_url":"https://api.github.com/users/edu165/following{/other_user}","gists_url":"https://api.github.com/users/edu165/gists{/gist_id}","starred_url":"https://api.github.com/users/edu165/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edu165/subscriptions","organizations_url":"https://api.github.com/users/edu165/orgs","repos_url":"https://api.github.com/users/edu165/repos","events_url":"https://api.github.com/users/edu165/events{/privacy}","received_events_url":"https://api.github.com/users/edu165/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/edu165/EDD","description":"","fork":true,"url":"https://api.github.com/repos/edu165/EDD","forks_url":"https://api.github.com/repos/edu165/EDD/forks","keys_url":"https://api.github.com/repos/edu165/EDD/keys{/key_id}","collaborators_url":"https://api.github.com/repos/edu165/EDD/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/edu165/EDD/teams","hooks_url":"https://api.github.com/repos/edu165/EDD/hooks","issue_events_url":"https://api.github.com/repos/edu165/EDD/issues/events{/number}","events_url":"https://api.github.com/repos/edu165/EDD/events","assignees_url":"https://api.github.com/repos/edu165/EDD/assignees{/user}","branches_url":"https://api.github.com/repos/edu165/EDD/branches{/branch}","tags_url":"https://api.github.com/repos/edu165/EDD/tags","blobs_url":"https://api.github.com/repos/edu165/EDD/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/edu165/EDD/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/edu165/EDD/git/refs{/sha}","trees_url":"https://api.github.com/repos/edu165/EDD/git/trees{/sha}","statuses_url":"https://api.github.com/repos/edu165/EDD/statuses/{sha}","languages_url":"https://api.github.com/repos/edu165/EDD/languages","stargazers_url":"https://api.github.com/repos/edu165/EDD/stargazers","contributors_url":"https://api.github.com/repos/edu165/EDD/contributors","subscribers_url":"https://api.github.com/repos/edu165/EDD/subscribers","subscription_url":"https://api.github.com/repos/edu165/EDD/subscription","commits_url":"https://api.github.com/repos/edu165/EDD/commits{/sha}","git_commits_url":"https://api.github.com/repos/edu165/EDD/git/commits{/sha}","comments_url":"https://api.github.com/repos/edu165/EDD/comments{/number}","issue_comment_url":"https://api.github.com/repos/edu165/EDD/issues/comments{/number}","contents_url":"https://api.github.com/repos/edu165/EDD/contents/{+path}","compare_url":"https://api.github.com/repos/edu165/EDD/compare/{base}...{head}","merges_url":"https://api.github.com/repos/edu165/EDD/merges","archive_url":"https://api.github.com/repos/edu165/EDD/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/edu165/EDD/downloads","issues_url":"https://api.github.com/repos/edu165/EDD/issues{/number}","pulls_url":"https://api.github.com/repos/edu165/EDD/pulls{/number}","milestones_url":"https://api.github.com/repos/edu165/EDD/milestones{/number}","notifications_url":"https://api.github.com/repos/edu165/EDD/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/edu165/EDD/labels{/name}","releases_url":"https://api.github.com/repos/edu165/EDD/releases{/id}","deployments_url":"https://api.github.com/repos/edu165/EDD/deployments","created_at":"2016-02-24T12:20:17Z","updated_at":"2016-02-24T12:20:17Z","pushed_at":"2016-03-01T17:21:08Z","git_url":"git://github.com/edu165/EDD.git","ssh_url":"git@github.com:edu165/EDD.git","clone_url":"https://github.com/edu165/EDD.git","svn_url":"https://github.com/edu165/EDD","homepage":null,"size":418,"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":"FPGS:master","ref":"master","sha":"0e5cdae7ee64b1b97b8cb46c6255492413499adf","user":{"login":"FPGS","id":16159865,"avatar_url":"https://avatars.githubusercontent.com/u/16159865?v=3","gravatar_id":"","url":"https://api.github.com/users/FPGS","html_url":"https://github.com/FPGS","followers_url":"https://api.github.com/users/FPGS/followers","following_url":"https://api.github.com/users/FPGS/following{/other_user}","gists_url":"https://api.github.com/users/FPGS/gists{/gist_id}","starred_url":"https://api.github.com/users/FPGS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FPGS/subscriptions","organizations_url":"https://api.github.com/users/FPGS/orgs","repos_url":"https://api.github.com/users/FPGS/repos","events_url":"https://api.github.com/users/FPGS/events{/privacy}","received_events_url":"https://api.github.com/users/FPGS/received_events","type":"Organization","site_admin":false},"repo":{"id":42181950,"name":"EDD","full_name":"FPGS/EDD","owner":{"login":"FPGS","id":16159865,"avatar_url":"https://avatars.githubusercontent.com/u/16159865?v=3","gravatar_id":"","url":"https://api.github.com/users/FPGS","html_url":"https://github.com/FPGS","followers_url":"https://api.github.com/users/FPGS/followers","following_url":"https://api.github.com/users/FPGS/following{/other_user}","gists_url":"https://api.github.com/users/FPGS/gists{/gist_id}","starred_url":"https://api.github.com/users/FPGS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FPGS/subscriptions","organizations_url":"https://api.github.com/users/FPGS/orgs","repos_url":"https://api.github.com/users/FPGS/repos","events_url":"https://api.github.com/users/FPGS/events{/privacy}","received_events_url":"https://api.github.com/users/FPGS/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/FPGS/EDD","description":"","fork":false,"url":"https://api.github.com/repos/FPGS/EDD","forks_url":"https://api.github.com/repos/FPGS/EDD/forks","keys_url":"https://api.github.com/repos/FPGS/EDD/keys{/key_id}","collaborators_url":"https://api.github.com/repos/FPGS/EDD/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/FPGS/EDD/teams","hooks_url":"https://api.github.com/repos/FPGS/EDD/hooks","issue_events_url":"https://api.github.com/repos/FPGS/EDD/issues/events{/number}","events_url":"https://api.github.com/repos/FPGS/EDD/events","assignees_url":"https://api.github.com/repos/FPGS/EDD/assignees{/user}","branches_url":"https://api.github.com/repos/FPGS/EDD/branches{/branch}","tags_url":"https://api.github.com/repos/FPGS/EDD/tags","blobs_url":"https://api.github.com/repos/FPGS/EDD/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/FPGS/EDD/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/FPGS/EDD/git/refs{/sha}","trees_url":"https://api.github.com/repos/FPGS/EDD/git/trees{/sha}","statuses_url":"https://api.github.com/repos/FPGS/EDD/statuses/{sha}","languages_url":"https://api.github.com/repos/FPGS/EDD/languages","stargazers_url":"https://api.github.com/repos/FPGS/EDD/stargazers","contributors_url":"https://api.github.com/repos/FPGS/EDD/contributors","subscribers_url":"https://api.github.com/repos/FPGS/EDD/subscribers","subscription_url":"https://api.github.com/repos/FPGS/EDD/subscription","commits_url":"https://api.github.com/repos/FPGS/EDD/commits{/sha}","git_commits_url":"https://api.github.com/repos/FPGS/EDD/git/commits{/sha}","comments_url":"https://api.github.com/repos/FPGS/EDD/comments{/number}","issue_comment_url":"https://api.github.com/repos/FPGS/EDD/issues/comments{/number}","contents_url":"https://api.github.com/repos/FPGS/EDD/contents/{+path}","compare_url":"https://api.github.com/repos/FPGS/EDD/compare/{base}...{head}","merges_url":"https://api.github.com/repos/FPGS/EDD/merges","archive_url":"https://api.github.com/repos/FPGS/EDD/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/FPGS/EDD/downloads","issues_url":"https://api.github.com/repos/FPGS/EDD/issues{/number}","pulls_url":"https://api.github.com/repos/FPGS/EDD/pulls{/number}","milestones_url":"https://api.github.com/repos/FPGS/EDD/milestones{/number}","notifications_url":"https://api.github.com/repos/FPGS/EDD/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/FPGS/EDD/labels{/name}","releases_url":"https://api.github.com/repos/FPGS/EDD/releases{/id}","deployments_url":"https://api.github.com/repos/FPGS/EDD/deployments","created_at":"2015-09-09T14:02:32Z","updated_at":"2016-02-24T16:35:43Z","pushed_at":"2016-03-03T16:03:20Z","git_url":"git://github.com/FPGS/EDD.git","ssh_url":"git@github.com:FPGS/EDD.git","clone_url":"https://github.com/FPGS/EDD.git","svn_url":"https://github.com/FPGS/EDD","homepage":null,"size":425,"stargazers_count":2,"watchers_count":2,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":25,"mirror_url":null,"open_issues_count":7,"forks":25,"open_issues":7,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/FPGS/EDD/pulls/39"},"html":{"href":"https://github.com/FPGS/EDD/pull/39"},"issue":{"href":"https://api.github.com/repos/FPGS/EDD/issues/39"},"comments":{"href":"https://api.github.com/repos/FPGS/EDD/issues/39/comments"},"review_comments":{"href":"https://api.github.com/repos/FPGS/EDD/pulls/39/comments"},"review_comment":{"href":"https://api.github.com/repos/FPGS/EDD/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/FPGS/EDD/pulls/39/commits"},"statuses":{"href":"https://api.github.com/repos/FPGS/EDD/statuses/e3068a642bcd38a1ebf076c830e19109325f9e44"}}}}