{"id":18518367,"url":"https://github.com/flash3388/demexercisesboi","last_synced_at":"2026-02-08T07:06:45.292Z","repository":{"id":170806690,"uuid":"492220079","full_name":"Flash3388/DemExercisesBoi","owner":"Flash3388","description":null,"archived":false,"fork":false,"pushed_at":"2022-05-14T13:12:58.000Z","size":1,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-08-07T05:31:44.854Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"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/Flash3388.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,"zenodo":null}},"created_at":"2022-05-14T13:11:30.000Z","updated_at":"2022-05-14T13:11:30.000Z","dependencies_parsed_at":null,"dependency_job_id":"d555d8f8-64d7-44d9-b37d-aa5c31fb726a","html_url":"https://github.com/Flash3388/DemExercisesBoi","commit_stats":null,"previous_names":["flash3388/demexercisesboi"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Flash3388/DemExercisesBoi","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Flash3388%2FDemExercisesBoi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Flash3388%2FDemExercisesBoi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Flash3388%2FDemExercisesBoi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Flash3388%2FDemExercisesBoi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Flash3388","download_url":"https://codeload.github.com/Flash3388/DemExercisesBoi/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Flash3388%2FDemExercisesBoi/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29224432,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-08T06:05:31.539Z","status":"ssl_error","status_checked_at":"2026-02-08T05:58:33.853Z","response_time":57,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":[],"created_at":"2024-11-06T17:13:08.194Z","updated_at":"2026-02-08T07:06:45.276Z","avatar_url":"https://github.com/Flash3388.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Java Exercises\n\n## Recap\n\n#### Read\n- [OOP Concepts](https://www.geeksforgeeks.org/object-oriented-programming-oops-concept-in-java/)\n  - no need to read about \"Pillars of OOP\" \n- [Classes](https://www.geeksforgeeks.org/classes-objects-java/)\n- [Methods](https://www.geeksforgeeks.org/methods-in-java/)\n- [Strings](https://www.geeksforgeeks.org/strings-in-java/)\n- [Lists](https://www.geeksforgeeks.org/arraylist-in-java/)\n  - will be needed for the last exercise \n\n#### Watch\n- [thenewboston](https://www.youtube.com/playlist?list=PLFE2CE09D83EE3E28)\n  -  videos 14, 15, 16, 38, 39, 40, 46, 47\n\n\n## Exercises\n\n#### Binary to Decimal Converter\nWrite a program to convert a binary number (contained in a `String`, such that each character in the string is either `0` or `1`) to a decimal (as an `int`). Implement the program in 2 parts:\n- a method which receives a `String` binary and returns an `int` decimal number\n- a `main` which reads a binary number from the user and uses said method to convert the number and display the result returned from it.\n\nDon't use any built-in utilities which already implement the conversion, implement it yourselves. You can read [here](https://www.rapidtables.com/convert/number/binary-to-decimal.html) about how to perform the conversion.\n\nFor example: binary `\"101\"` is equal to decimal `5`.\n\n#### Reverse a String\nWrite a program which reverses the order of characters in a `String`. Implement the program in 2 parts:\n- a method which receives a `String` to reverse, and returns a reversed `String`\n- a `main` which reads the `String` from the user and uses said method to reverse the `String` and print the results.\n\nFor example: `\"This is the greatest plan\"` reversed is `\"nalp tsetaerg eht si sihT\"`.\n\n#### Ceaser Cipher\nWrite a program capable of encrypting and decrypting `String`s using the [_Ceaser Cipher_](https://en.wikipedia.org/wiki/Caesar_cipher). Implement the cipher in 2 programs - one for encrypting and one for decrypting. Each program will be made up of:\n- a method for encrypting or decrypting a `String`.\n- a `main` which reads a `String` from the user and uses said method to encrypt or decrypt the `String` and prints the result.\n\nFor some explanation of the cipher, read [here](https://www.dcode.fr/caesar-cipher). But basically the idea is that each character is replaced by another character. That character is selected by the cipher, which is basically a _shift_ of the alphabet. So if `shift=2`, we would get that `a = c`. \n\nSelect your own cipher (i.e. shift).\n\n#### Inventory\n\nCreate a shop _inventory_ program. This is an OOP project, and you are expected to create classes. The program should:\n- keep track of products in the shop\n- allow users to add products \n  - add quantity to the product. If the product already exists in the shop, add quantity to the existing product;\n  if does not exist, create a new product in the shop.\n- allow users to remove products\n  - remove some quantity from the product. If the quantity is 0, the product is removed from the shop. \n- allow users query a list of products\n  - print information about all the products in the shop \n \nYou should divide your program to the following classes:\n- `Product`: holding information about a single product.\n  - Name of the product\n  - Amount of the product \n  - Getters and setters for name and amount\n- `Shop`: holding information about the entire shop.\n  - List of the products in the shop \n  - Getters and setters for the list\n- `Main`: the main program.\n  - all the things regarding user interaction  \n\nInteraction with the program will be done via a menu. Options will be displayed to the user, allowing him to select what to do with the program. Example:\n\n```\n1. View products\n2. Add Product\n3. Remove Product\n4. Exit\nSelect: \n```\n\nThe user will then enter a number indicating the action to perform. The program will then move to a sub-menu depending on the action.\n\n```\n1. View products\n2. Add Product\n3. Remove Product\n4. Exit\nSelect: 2\n\nEnter Product Name: Whip\nEnter Product Quantity: 5\n```\n\nUpon finishing work with the sub-menu, the program will return to the main menu.\n\nYou do have some freedom to implement things a bit differently, but I do expect at least the minimum described here.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflash3388%2Fdemexercisesboi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fflash3388%2Fdemexercisesboi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflash3388%2Fdemexercisesboi/lists"}