Skip to content

Stage 0: Add Java fundamentals exercises - #81

Open
CodeMyGame1 wants to merge 10 commits into
frcsoftware:mainfrom
CodeMyGame1:stage0-exercises
Open

Stage 0: Add Java fundamentals exercises#81
CodeMyGame1 wants to merge 10 commits into
frcsoftware:mainfrom
CodeMyGame1:stage0-exercises

Conversation

@CodeMyGame1

@CodeMyGame1 CodeMyGame1 commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Description

Adds exercises for stage 0 (Java Fundamentals), to complement the stage 0 lessons being built up.

Meta

Merge checklist:

Comment thread stage0/solution/Operators.java Outdated
@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown

🌐 Preview URL: https://pr-81.frcsoftware.pages.dev

Comment thread examples/stage0/solutions/Conditionals.java Outdated
Comment thread examples/stage0/solutions/Conditionals.java Outdated
Comment thread examples/stage0/solutions/Operators.java Outdated
Comment thread examples/stage0/solutions/Operators.java Outdated
Comment thread examples/stage0/solutions/Print.java Outdated
@Adrianamm
Adrianamm self-requested a review August 13, 2026 05:45
@CodeMyGame1
CodeMyGame1 marked this pull request as ready for review August 18, 2026 06:27
@github-actions github-actions Bot added the Curriculum material Curriculum materials, lessons for students, etc label Aug 18, 2026

@Daniel1464 Daniel1464 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Does this also need a separate exercises gradle project? Otherwise, looks good

// otherwise. After running, change `statusCode` to "OK"; the code should
// now print "Success!"
String statusCode = "ERROR";
if (statusCode != "OK") {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.");

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.");

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Curriculum material Curriculum materials, lessons for students, etc examples Stage 0 stage0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants