Title: feat: add educational OOP concepts following TypeScript Handbook (#290) by MOHD-TAHA-KHAN · Pull Request #306 · TheAlgorithms/TypeScript · GitHub
Open Graph Title: feat: add educational OOP concepts following TypeScript Handbook (#290) by MOHD-TAHA-KHAN · Pull Request #306 · TheAlgorithms/TypeScript
X Title: feat: add educational OOP concepts following TypeScript Handbook (#290) by MOHD-TAHA-KHAN · Pull Request #306 · TheAlgorithms/TypeScript
Description: [FEATURE]: OOP Educational Guide - Abstraction, Inheritance, Encapsulation, and Polymorphism 📝 Description This PR resolves #290 by introducing a structured set of educational examples focused on Object-Oriented Programming (OOP) in TypeScript. Following the guidelines from the TypeScript Handbook, these examples are designed to help contributors and students understand how to architect clean, reusable, and maintainable code. 🚀 Key Educational Concepts To provide a clear learning path, the code is organized into concept-specific files: oop/Abstraction.ts: Demonstrates the use of abstract classes and methods to define blueprints. oop/Inheritance.ts: Shows how to extend classes using the extends and super keywords. oop/Encapsulation.ts: Illustrates data protection using private and protected access modifiers along with getters. oop/Polymorphism.ts: Provides examples of using interfaces to treat different concrete implementations as a single type. 📚 Documentation References Each file is heavily commented and refers to the following official documentation for deeper understanding: TypeScript Handbook: Classes TypeScript Handbook: Member Visibility TypeScript Handbook: Abstract Classes 🧪 Testing Comprehensive unit tests have been added in oop/__tests__/OOP.test.ts to verify the mathematical and logical correctness of the examples. Verified Inheritance and Abstraction logic via Rectangle area calculation. Verified Encapsulation by testing private property protection in BankAccount. Verified Polymorphic behavior using different Logger implementations. By structuring these as separate files, this contribution serves as a living syllabus for the repository's OOP standards.
Open Graph Description: [FEATURE]: OOP Educational Guide - Abstraction, Inheritance, Encapsulation, and Polymorphism 📝 Description This PR resolves #290 by introducing a structured set of educational examples focused on O...
X Description: [FEATURE]: OOP Educational Guide - Abstraction, Inheritance, Encapsulation, and Polymorphism 📝 Description This PR resolves #290 by introducing a structured set of educational examples focused on O...
Opengraph URL: https://github.com/TheAlgorithms/TypeScript/pull/306
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:aff30a2e-317c-3ad5-8769-c8c536bc7e5d |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | EA90:119F46:941F40:D2D749:6A631DD4 |
| html-safe-nonce | 14e1036ec050e988cf481fd1dbd7b145c7d78093838a84d73c81d1f9b6788ef1 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFQTkwOjExOUY0Njo5NDFGNDA6RDJENzQ5OjZBNjMxREQ0IiwidmlzaXRvcl9pZCI6IjIzMDc5NDE4MDI2MDIzMzk3OTYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 430c4b074ffefcdde6da45b949793d7828f7bd77f90be9b653fd627fb2cbc8a7 |
| hovercard-subject-tag | pull_request:3645376621 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/TheAlgorithms/TypeScript/pull/306/files |
| twitter:image | https://avatars.githubusercontent.com/u/114274512?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/114274512?s=400&v=4 |
| og:image:alt | [FEATURE]: OOP Educational Guide - Abstraction, Inheritance, Encapsulation, and Polymorphism 📝 Description This PR resolves #290 by introducing a structured set of educational examples focused on O... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 1a6c056e02f174fffc096c521ec0ff6fb83e40a2ec8cb8875466ec1524872dd6 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/TheAlgorithms/TypeScript git https://github.com/TheAlgorithms/TypeScript.git |
| octolytics-dimension-user_id | 20487725 |
| octolytics-dimension-user_login | TheAlgorithms |
| octolytics-dimension-repository_id | 532391729 |
| octolytics-dimension-repository_nwo | TheAlgorithms/TypeScript |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 532391729 |
| octolytics-dimension-repository_network_root_nwo | TheAlgorithms/TypeScript |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 6a93e25585f487ddff9e3996c06d5b869d6e1828 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width