Skip to content

Conversation

@xinri
Copy link
Contributor

@xinri xinri commented Nov 11, 2025

pull request

Add the design.md file for the jedliks-toy-car for the analyzer.

Fixes: #2676


Reviewer Resources:

Track Policies

@xinri xinri force-pushed the add-analyzer-design-for-jedliks-toy-car branch 3 times, most recently from 71c5e76 to 3be4665 Compare November 13, 2025 20:04
Comment on lines 37 to 39
- `essential`: Verify that the solution has the fields in the class for battery percentage and the driving distance.
- `essential`: Verify that the solution updates the variables in the drive method.
- `essential`: Verify that the solution is not updating values when the battery is empty.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • essential: Verify that the solution has the fields in the class for battery percentage and the driving distance.

I don't think we should be insisting that there are specific fields for battery percentage and driving distance. To be honest, I'm not sure how reliably an analyzer implementation can tell which fields is for battery percentage and driving distance. Instead, I'd suggest simply checking that the class has fields.

  • essential: Verify that the solution updates the variables in the drive method.

Did you mean "updates the fields in the class"?

essential: Verify that the solution is not updating values when the battery is empty.

I don't think we need this one - I think the last two tests cover this.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry yes I mean fields.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we should be insisting that there are specific fields for battery percentage and driving distance. To be honest, I'm not sure how reliably an analyzer implementation can tell which fields is for battery percentage and driving distance. Instead, I'd suggest simply checking that the class has fields.

mmmh ok. thanks for taking account the analyzer

- `actionable`: If the solution defines the fields as `public`, instruct the student to use `private` and explain the encapsulation principle.
- `informative`: If the solution does not use a primitive as a type for the fields, inform the student to use it.
Explain that the values cannot be null and it is less error-prone
- `informative`: If the solution updates variables outside the drive function, instruct the student to move there.
Copy link
Member

@kahgoh kahgoh Nov 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't quite understand what you mean by "move there". Is it checking that the fields are only changed in the drive method?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will remove this, I saw the unit tests that just create the instance with the new (and not the buy) and will test the battery and the distance. I thought perhaps the mentee can do a -- for battery or ++ for the distance when calling the function batterydisplay and distanceDisplay

@xinri xinri force-pushed the add-analyzer-design-for-jedliks-toy-car branch from 3be4665 to 9834189 Compare November 15, 2025 17:46
@xinri xinri force-pushed the add-analyzer-design-for-jedliks-toy-car branch from 9834189 to 94b707f Compare November 15, 2025 17:48
Copy link
Member

@kahgoh kahgoh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good now! Thanks!

@kahgoh kahgoh merged commit 6cfa806 into exercism:main Nov 15, 2025
3 checks passed
@xinri
Copy link
Contributor Author

xinri commented Nov 15, 2025

Great, thank you very much for the review. I will try to check this analyzer ;)

@xinri xinri deleted the add-analyzer-design-for-jedliks-toy-car branch November 18, 2025 06:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

jedliks-toy-car: describe Analyzer feedback in .meta/design.md

2 participants