{"id":16104988,"url":"https://github.com/dbc2201/cars-assemble","last_synced_at":"2025-07-14T22:34:37.755Z","repository":{"id":133011533,"uuid":"461853588","full_name":"dbc2201/cars-assemble","owner":"dbc2201","description":null,"archived":false,"fork":false,"pushed_at":"2022-02-21T12:34:04.000Z","size":97,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-06T02:32:43.466Z","etag":null,"topics":["exercism-solutions","java"],"latest_commit_sha":null,"homepage":"https://exercism.org/tracks/java/exercises/cars-assemble","language":"HTML","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/dbc2201.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-02-21T12:34:00.000Z","updated_at":"2022-02-21T12:34:51.000Z","dependencies_parsed_at":null,"dependency_job_id":"872b3fc9-8124-46d4-8489-e85a85109263","html_url":"https://github.com/dbc2201/cars-assemble","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dbc2201/cars-assemble","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbc2201%2Fcars-assemble","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbc2201%2Fcars-assemble/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbc2201%2Fcars-assemble/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbc2201%2Fcars-assemble/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dbc2201","download_url":"https://codeload.github.com/dbc2201/cars-assemble/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbc2201%2Fcars-assemble/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265360995,"owners_count":23752833,"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":["exercism-solutions","java"],"created_at":"2024-10-09T19:07:38.335Z","updated_at":"2025-07-14T22:34:37.714Z","avatar_url":"https://github.com/dbc2201.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Cars, Assemble!\n\nWelcome to Cars, Assemble! on Exercism's Java Track. If you need help running the tests or submitting your code, check\nout `HELP.md`. If you get stuck on the exercise, check out `HINTS.md`, but try and solve it without using those first :)\n\n## Introduction\n\nThere are two different types of numbers in Java:\n\n- Integers: numbers with no digits behind the decimal separator (whole numbers). Examples are `-6`, `0`, `1`, `25`\n  , `976` and `-500000`.\n- Floating-point numbers: numbers with zero or more digits behind the decimal separator. Examples are `-20.4`, `0.1`\n  , `2.72`, `16.984025` and `1024.0`.\n\nThe two most common numeric types in Java are `int` and `double`. An `int` is a 32-bit integer and a `double` is a\n64-bit floating-point number.\n\nArithmetic is done using the standard arithmetic operators. Numbers can be compared using the standard numeric\ncomparison operators and the equality (`==`) and inequality (`!=`) operators.\n\nJava has two types of numeric conversions:\n\n1. Implicit conversions: no data will be lost and no additional syntax is required.\n2. Explicit conversions: data could be lost and additional syntax in the form of a _cast_ is required.\n\nAs an `int` has less precision than a `double`, converting from an `int` to a `double` is safe and is thus an implicit\nconversion. However, converting from a `double` to an `int` could mean losing data, so that requires an explicit\nconversion.\n\nIn this exercise you must conditionally execute logic. The most common way to do this in Java is by using an `if/else`\nstatement:\n\n```java\nint x=6;\n\n        if(x==5){\n        // Execute logic if x equals 5\n        }else if(x\u003e7){\n        // Execute logic if x greater than 7\n        }else{\n        // Execute logic in all other cases\n        }\n```\n\nThe condition of an `if` statement must be of type `boolean`. Java has no concept of _truthy_ values.\n\n## Instructions\n\nIn this exercise you'll be writing code to analyze the production of an assembly line in a car factory. The assembly\nline's speed can range from `0` (off) to `10` (maximum).\n\nAt its lowest speed (`1`), `221` cars are produced each hour. The production increases linearly with the speed. So with\nthe speed set to `4`, it should produce `4 * 221 = 884` cars per hour. However, higher speeds increase the likelihood\nthat faulty cars are produced, which then have to be discarded. The following table shows how speed influences the\nsuccess rate:\n\n- `1` to `4`: 100% success rate.\n- `5` to `8`: 90% success rate.\n- `9`: 80% success rate.\n- `10`: 77% success rate.\n\nYou have two tasks.\n\n## 1. Calculate the production rate per hour\n\nImplement the `CarsAssemble.productionRatePerHour()` method to calculate the assembly line's production rate per hour,\ntaking into account its current assembly line's speed :\n\n```Java\nCarsAssemble.productionRatePerHour(6)\n// =\u003e 1193.4\n```\n\nNote that the value returned is a `double`.\n\n## 2. Calculate the number of working items produced per minute\n\nImplement the `CarsAssemble.workingItemsPerMinute()` method to calculate how many working cars are produced per minute:\n\n```Java\nCarsAssemble.workingItemsPerMinute(6)\n// =\u003e 19\n```\n\nNote that the value returned is an `int`.\n\n## Source\n\n### Created by\n\n- @TalesDias","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdbc2201%2Fcars-assemble","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdbc2201%2Fcars-assemble","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdbc2201%2Fcars-assemble/lists"}