{"id":20954689,"url":"https://github.com/tiagocbarbosa/javascript-oop","last_synced_at":"2025-12-28T08:05:09.941Z","repository":{"id":163277899,"uuid":"297110103","full_name":"tiagocbarbosa/javascript-oop","owner":"tiagocbarbosa","description":null,"archived":false,"fork":false,"pushed_at":"2021-02-11T12:58:37.000Z","size":41,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-19T23:23:41.679Z","etag":null,"topics":["javascript-es6","oop","poo"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tiagocbarbosa.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-09-20T15:51:32.000Z","updated_at":"2022-02-17T17:35:04.000Z","dependencies_parsed_at":null,"dependency_job_id":"49be2a57-2d45-40b9-aace-5062425896eb","html_url":"https://github.com/tiagocbarbosa/javascript-oop","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tiagocbarbosa%2Fjavascript-oop","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tiagocbarbosa%2Fjavascript-oop/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tiagocbarbosa%2Fjavascript-oop/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tiagocbarbosa%2Fjavascript-oop/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tiagocbarbosa","download_url":"https://codeload.github.com/tiagocbarbosa/javascript-oop/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243351860,"owners_count":20276911,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["javascript-es6","oop","poo"],"created_at":"2024-11-19T01:16:04.641Z","updated_at":"2025-12-28T08:05:09.864Z","avatar_url":"https://github.com/tiagocbarbosa.png","language":"JavaScript","readme":"# javascript-oop\nThis is my `javascript` project using some OOP concepts.\n\n## About\nIt is highly recommended to start looking at the \"index.js\" file, there I explain some aspects of my project.\n\nCheck below a list of OOP concepts that you will find in this project.\n\n### Class\nIn \"Client\\Client.js\":\n```js\nclass Client {\n  // ...\n}\n```\n\n### Encapsulation\nPrivate attribute in \"Employee\\Employee.js\":\n```js\nconstructor(name, salary, cpf) {\n  this._name = name\n  // ...\n}\n```\n\n### Abstraction\nAbstract method in \"Account\\Account.js\":\n```js\nwithdraw(value) {\n  throw new Error('Abstract methods must be overwritten')\n}\n```\nAbstract class in \"Account\\Account.js\":\n```js\nconstructor(initialBalance, client, agency) {\n  if(this.constructor == Account) {\n    throw new Error('You cannot initialize an Abstract class of the type Account')\n  }\n  // ...\n}\n```\n\n### Inheritance\nIn \"Account\\SavingAccount.js\":\n```js\nclass SavingAccount extends Account {\n  // ...\n}\n```\n\n### Polymorphism\nIn \"Account\\CheckingAccount.js\":\n```js\nwithdraw(value) {\n  const tax = 1.1\n  return this._withdraw(value, tax)\n}\n```\nIn \"Account\\SalaryAccount.js\":\n```js\nwithdraw(value) {\n  const tax = 1.01\n  return this._withdraw(value, tax)\n}\n```\n\n### Interface\nIn \"AuthenticationSystem\\AuthenticationSystem.js\":\n```js\nstatic isAuthenticable(authenticable) {\n  return 'authenticate' in authenticable\n  \u0026\u0026 authenticable.authenticate instanceof Function\n}\n```\n\n------\n\nAnd that's pretty much it, hope you liked it! Thanks :)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftiagocbarbosa%2Fjavascript-oop","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftiagocbarbosa%2Fjavascript-oop","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftiagocbarbosa%2Fjavascript-oop/lists"}