-
-
Notifications
You must be signed in to change notification settings - Fork 744
Add analyzer design for jedliks toy car #3047
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add analyzer design for jedliks toy car #3047
Conversation
71c5e76 to
3be4665
Compare
| - `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. |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
3be4665 to
9834189
Compare
9834189 to
94b707f
Compare
kahgoh
left a comment
There was a problem hiding this 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!
|
Great, thank you very much for the review. I will try to check this analyzer ;) |
pull request
Add the design.md file for the jedliks-toy-car for the analyzer.
Fixes: #2676
Reviewer Resources:
Track Policies