Stage 0: Add Java fundamentals exercises - #81
Open
CodeMyGame1 wants to merge 10 commits into
Open
Conversation
CodeMyGame1
force-pushed
the
stage0-exercises
branch
from
July 8, 2026 16:14
d44b835 to
d0e40bf
Compare
Daniel1464
suggested changes
Jul 8, 2026
|
🌐 Preview URL: https://pr-81.frcsoftware.pages.dev |
ArchdukeTim
suggested changes
Aug 13, 2026
Adrianamm
self-requested a review
August 13, 2026 05:45
CodeMyGame1
marked this pull request as ready for review
August 18, 2026 06:27
Daniel1464
suggested changes
Aug 18, 2026
| // otherwise. After running, change `statusCode` to "OK"; the code should | ||
| // now print "Success!" | ||
| String statusCode = "ERROR"; | ||
| if (statusCode != "OK") { |
Contributor
There was a problem hiding this comment.
You generally shouldn't compare strings with == and !=, so its probably better to use an int here (they probably haven't learned enough to use enums).
| if ((input >= 5) && (input <= 100)) { | ||
| System.out.println("Controller input detected."); | ||
| } else { | ||
| System.out.println("Discarding input."); |
Contributor
There was a problem hiding this comment.
Might be a good idea to add a input = 0; statement here for clarity sake.
| // After running, change `input` to 2; the code should now print "Discarding input." | ||
| double input = 20; | ||
| if ((input >= 5) && (input <= 100)) { | ||
| System.out.println("Controller input detected."); |
Contributor
There was a problem hiding this comment.
Adding a motor.setThrottle(input / 100.0) command here would be helpful so that the reader understands what you do with an input after you deadband it.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds exercises for stage 0 (Java Fundamentals), to complement the stage 0 lessons being built up.
Meta
Merge checklist: