{"id":24716887,"url":"https://github.com/samyam81/prototype_design","last_synced_at":"2025-10-24T13:05:36.051Z","repository":{"id":224004716,"uuid":"747065487","full_name":"samyam81/Prototype_Design","owner":"samyam81","description":"This Kotlin project demonstrates a basic implementation of a bookshop system, including functionalities for managing books, loading data, removing books, and creating copies of bookshops.","archived":false,"fork":false,"pushed_at":"2024-05-20T06:54:10.000Z","size":10,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-27T09:14:28.718Z","etag":null,"topics":["java","kotlin","prototype","prototype-pattern"],"latest_commit_sha":null,"homepage":"","language":"Java","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-23T07:37:45.000Z","updated_at":"2024-06-23T12:08:13.000Z","dependencies_parsed_at":"2024-02-23T08:24:29.649Z","dependency_job_id":"20be2b1a-3b4f-4eed-b112-0a468fef7066","html_url":"https://github.com/samyam81/Prototype_Design","commit_stats":null,"previous_names":["samyam81/prototype_design"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samyam81%2FPrototype_Design","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samyam81%2FPrototype_Design/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samyam81%2FPrototype_Design/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samyam81%2FPrototype_Design/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/samyam81","download_url":"https://codeload.github.com/samyam81/Prototype_Design/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244932993,"owners_count":20534270,"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":["java","kotlin","prototype","prototype-pattern"],"created_at":"2025-01-27T09:14:31.851Z","updated_at":"2025-10-05T15:12:51.830Z","avatar_url":"https://github.com/samyam81.png","language":"Java","readme":"**Readme File: Prototype Bookshop**\n\n---\n\n**Description:**\n\nThis project demonstrates a simple implementation of a bookshop system using Kotlin. It includes classes for managing books and bookshops, with functionality for loading data, removing books, and creating copies of bookshops.\n\n---\n\n**Files:**\n\n1. **Book.kt:** Defines the `Book` class representing individual books in the bookshop.\n\n2. **Bookshop.kt:** Defines the `Bookshop` class representing the bookshop entity, including methods for loading data, removing books, creating copies, and overriding `toString()` for easy printing.\n\n3. **Main.kt:** Contains the `main()` function demonstrating the usage of the `Bookshop` class and its functionalities.\n\n---\n\n**Usage:**\n\n1. Clone or download the project files.\n\n2. Open the project in a Kotlin-compatible IDE or text editor.\n\n3. Compile and run the `Main.kt` file to see the demonstration of the bookshop system.\n\n---\n\n**Functionality:**\n\n- **Load Data:** The `loadData()` function populates the bookshop with a set of sample books.\n\n- **Remove Book:** The `removeBook(index: Int)` function allows the removal of a book from the bookshop based on its index.\n\n- **Copy Bookshop:** The `copy()` function creates a deep copy of the bookshop, including all books.\n\n---\n\n**Example:**\n\n```\nval bs = Bookshop()\nbs.shopname = \"Ross_Taylor\"\nbs.loadData()\n\nprintln(bs)\n\nval bs1 = bs.copy()\nbs.removeBook(2)\nbs1.shopname = \"Kane_Williamson\"\nprintln(bs1)\n```\n\nThis example creates a bookshop, loads data, prints its contents, creates a copy of the bookshop, removes a book from the original bookshop, updates the copied bookshop's name, and prints the copied bookshop.\n\n---\n\n**Author:**\n\nSamyam.81\n\n---\n\nFeel free to modify and extend this project as needed for your own purposes!\n\n---\n\n**Note:** Ensure you have Kotlin installed on your system to run the project. If not, refer to the Kotlin documentation for installation instructions.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamyam81%2Fprototype_design","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsamyam81%2Fprototype_design","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamyam81%2Fprototype_design/lists"}