{"id":24716846,"url":"https://github.com/samyam81/adapter_design","last_synced_at":"2025-09-12T07:36:16.374Z","repository":{"id":238851301,"uuid":"749749239","full_name":"samyam81/Adapter_design","owner":"samyam81","description":" Adapter design pattern allows incompatible interfaces to work together by providing a wrapper that translates the interface of a class into another interface that a client expect.","archived":false,"fork":false,"pushed_at":"2024-05-26T07:30:05.000Z","size":20,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-08T04:51:12.315Z","etag":null,"topics":["adapter","cpp","csharp","design","design-patterns","java","kotlin","python"],"latest_commit_sha":null,"homepage":"","language":"C#","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/samyam81.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":"2024-01-29T10:17:00.000Z","updated_at":"2024-06-23T12:07:38.000Z","dependencies_parsed_at":"2024-05-08T14:44:52.112Z","dependency_job_id":null,"html_url":"https://github.com/samyam81/Adapter_design","commit_stats":null,"previous_names":["samyam81/adapter_design"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/samyam81/Adapter_design","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samyam81%2FAdapter_design","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samyam81%2FAdapter_design/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samyam81%2FAdapter_design/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samyam81%2FAdapter_design/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/samyam81","download_url":"https://codeload.github.com/samyam81/Adapter_design/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samyam81%2FAdapter_design/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274777064,"owners_count":25347643,"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","status":"online","status_checked_at":"2025-09-12T02:00:09.324Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["adapter","cpp","csharp","design","design-patterns","java","kotlin","python"],"created_at":"2025-01-27T09:14:27.609Z","updated_at":"2025-09-12T07:36:16.354Z","avatar_url":"https://github.com/samyam81.png","language":"C#","readme":"# Adapter Design Pattern\n\nThis repository contains implementations of the Adapter design pattern in various programming languages. The Adapter pattern allows objects with incompatible interfaces to collaborate by converting the interface of one object into another interface that a client expects.\n\n## Files\n\n### Kotlin\n\n- **Main.kt**: Contains the main function to demonstrate the usage of the Adapter pattern.\n- **AssignmentWork.kt**: Defines the `AssignmentWork` class which uses a `PenAdapter` to write assignments.\n- **Pen.kt**: Defines the `Pen` interface.\n- **PenAdapter.kt**: Implements the `Pen` interface by adapting `PilotPen` to write assignments.\n\n### Java\n\n- **AssignmentWork.java**: Defines the `AssignmentWork` class which uses a `PenAdapter` to write assignments.\n- **Pen.java**: Defines the `Pen` interface.\n- **PenAdapter.java**: Implements the `Pen` interface by adapting `PilotPen` to write assignments.\n- **PilotPen.java**: Provides the implementation for writing using a Pilot Pen.\n- **School.java**: Contains the main function to demonstrate the usage of the Adapter pattern.\n\n### C++\n\n- **Main.cpp**: Contains the main function to demonstrate the usage of the Adapter pattern.\n- **AssignmentWork.cpp**: Defines the `AssignmentWork` class which uses a `PenAdapter` to write assignments.\n- **Pen.h**: Defines the `Pen` abstract class.\n- **PilotPen.h**: Provides the implementation for writing using a Pilot Pen.\n- **PenAdapter.cpp**: Implements the `Pen` interface by adapting `PilotPen` to write assignments.\n\n### C#\n\n- **School.cs**: Contains the main function to demonstrate the usage of the Adapter pattern.\n- **AssignmentWork.cs**: Defines the `AssignmentWork` class which uses a `PenAdapter` to write assignments.\n- **IPen.cs**: Defines the `IPen` interface.\n- **PenAdapter.cs**: Implements the `IPen` interface by adapting `PilotPen` to write assignments.\n- **PilotPen.cs**: Provides the implementation for writing using a Pilot Pen.\n\n### Python\n\n- **main.py**: Contains the main function to demonstrate the usage of the Adapter pattern.\n- **pen.py**: Defines the `Pen` interface.\n- **pilot_pen.py**: Provides the implementation for writing using a Pilot Pen.\n- **pen_adapter.py**: Implements the `Pen` interface by adapting `PilotPen` to write assignments.\n- **assignment_work.py**: Defines the `AssignmentWork` class which uses a `PenAdapter` to write assignments.\n\n## Usage\n\nEach implementation demonstrates how the Adapter pattern can be used to make two incompatible interfaces work together seamlessly. Simply run the main function in each respective language file to see the demonstration.\n\n## Contributors\n\n- [Samyam](https://github.com/samyam81) and \n- [Swikriti](https://github.com/swikriti0416)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamyam81%2Fadapter_design","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsamyam81%2Fadapter_design","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamyam81%2Fadapter_design/lists"}