{"id":19705586,"url":"https://github.com/furk4nbulut/account-number-controller-algorithm","last_synced_at":"2026-06-09T13:31:16.645Z","repository":{"id":156383316,"uuid":"583146570","full_name":"Furk4nBulut/Account-Number-Controller-Algorithm","owner":"Furk4nBulut","description":"This project involves a Java program designed to validate account numbers based on specific criteria. The program follows a set of rules to determine if an account number is valid or invalid, making use of string manipulation and basic arithmetic operations.","archived":false,"fork":false,"pushed_at":"2024-11-23T15:33:24.000Z","size":7,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-27T17:31:40.332Z","etag":null,"topics":["algorithm","java"],"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/Furk4nBulut.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":"2022-12-28T22:53:13.000Z","updated_at":"2024-11-24T05:58:56.000Z","dependencies_parsed_at":"2025-02-27T14:44:17.819Z","dependency_job_id":"cab54ff7-c065-4942-8b60-7a1d6d271a72","html_url":"https://github.com/Furk4nBulut/Account-Number-Controller-Algorithm","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Furk4nBulut/Account-Number-Controller-Algorithm","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Furk4nBulut%2FAccount-Number-Controller-Algorithm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Furk4nBulut%2FAccount-Number-Controller-Algorithm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Furk4nBulut%2FAccount-Number-Controller-Algorithm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Furk4nBulut%2FAccount-Number-Controller-Algorithm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Furk4nBulut","download_url":"https://codeload.github.com/Furk4nBulut/Account-Number-Controller-Algorithm/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Furk4nBulut%2FAccount-Number-Controller-Algorithm/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34110011,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-09T02:00:06.510Z","response_time":63,"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":["algorithm","java"],"created_at":"2024-11-11T21:29:15.411Z","updated_at":"2026-06-09T13:31:16.563Z","avatar_url":"https://github.com/Furk4nBulut.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Account Number Validation Program\n\n## Overview\n\nThis project involves a Java program designed to validate account numbers based on specific criteria. The program follows a set of rules to determine if an account number is valid or invalid, making use of string manipulation and basic arithmetic operations.\n\n## Assignment Details\n\n### Objective\n\nCreate a Java program that validates account numbers based on the following criteria:\n\n1. **Format**:\n   - The account number must be exactly 16 characters long.\n   - It must start with two capital letters where the first letter must be less than the second one (e.g., AB, CH, AZ).\n\n2. **Prime Number Check**:\n   - The two digits following the letters must represent a prime number.\n\n3. **Validation Algorithm**:\n   - **Step 1**: Double every second digit from right to left in the remaining 12 digits of the account number.\n     - If doubling results in a two-digit number, sum the digits of the result.\n   - **Step 2**: Sum all the single-digit numbers obtained from Step 1.\n   - **Step 3**: Add all the digits in the odd positions from right to left.\n   - **Step 4**: Sum the results from Step 2 and Step 3.\n   - **Step 5**: If the final sum is divisible by 10, the account number is valid; otherwise, it is invalid.\n\n### Code Explanation\n\n- **`accountNumberControl` Class**:\n  - Contains a static method `control` that performs the validation.\n  - Checks the format of the account number, performs prime number validation, and applies the Luhn algorithm to determine the validity.\n\n- **`Main` Class**:\n  - Prompts the user to input an account number.\n  - Calls the `control` method to validate the provided account number and prints the result.\n\n### Example\n\n**Input**:\n```\nAC11576018412626\n```\n\n**Output**:\n```\nAccount number is valid!\n```\n\n## Usage\n\n1. Compile the Java files using:\n   ```\n   javac Main.java accountNumberControl.java\n   ```\n2. Run the program using:\n   ```\n   java Main\n   ```\n3. Enter a 16-character account number when prompted.\n\n## Requirements\n\n- Java 8 or later\n\n## Notes\n\n- Ensure that the account number entered meets the length and format criteria before validation.\n- The program uses the Luhn algorithm for validating the account number's numerical section.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffurk4nbulut%2Faccount-number-controller-algorithm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffurk4nbulut%2Faccount-number-controller-algorithm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffurk4nbulut%2Faccount-number-controller-algorithm/lists"}