Cars Assemble Exercise - Java

The Cars Assemble exercise is a little confusing to some.

First there is a information about the success rate, which is perfectly fine.
Then first task is.

1. Calculate the production rate per hour

Implement the CarsAssemble.productionRatePerHour() method to calculate the assembly line's production rate per hour, taking into account its current assembly line's speed :

CarsAssemble.productionRatePerHour(6)
// => 1193.4

Note that the value returned is a double.

The function name doesn’t indicate, that we talk about working Items per hour, but only produced items per hour. I know the math doesn’t sum up if you don’t do it, but doesn’t indicate that you need to take the success rate into account.

We should help new comers to as easily as possible to understand the exercises.

Not all learning java comes from another language first, to some it’s their first language.

I couldn’t find anything about it in the GitHub - exercism/problem-specifications: Shared metadata for exercism exercises. so cannot see what is defined in general.

in the go-track the first function is called. CalculateWorkingCarsPerHour which already indicates that the success rate needs to be taking into account.

I would be happy to provide a PR, if suggestion is accepted.

Best
Tomas

The problem specs are used for practice problems. Cars Assemble is a concept problem so it lives entirely in the Java repo.

How odd… the other method (to workout the rate per minute) is already called workingItemsPerMinute, so I’d agree that the method names are a inconsistent / confusing. Would be happy to accept a PR to rename the method to workingItemsPerHour.

As IsaacG has mentioned, cars assemble is a concept exercise, so you would only need to update the exercise in the Java track’s GitHub repository.

1 Like

I’ll take care of a PR. Can you check how many exercises will break? I don’t recall how to do that.

11k completed exercises.

That’s a lot of solutions to break. Perhaps we should simple update the information text, to make the users aware of this. ?

I have created a suggestion for PR now.

1 Like