Skip to content

Stage 0: Add Java fundamentals exercises - #81

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

Stage 0: Add Java fundamentals exercises#81
CodeMyGame1 wants to merge 13 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

Comment thread examples/stage0/solutions/src/Conditionals.java Outdated
Comment thread examples/stage0/solutions/src/Conditionals.java
Comment thread examples/stage0/solutions/src/Conditionals.java
// After running, change `input` to 2; the code should now print "Discarding input."
double input = 20;
if ((input >= 5) && (input <= 100)) {
drivetrain.setThrottle(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.

The drivetrain.setThrottle() statement should be after the if statement. Currently, this statement will cause the drivetrain to move indefinitely at its previous speed if the joystick has a value below 5.

System.out.println("The shooter is moving.");
}

// Sanitize and "deadband" the below input using the logical AND operator;

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.

Would be worth explaining that sanitizing is rejecting values outside of the accepted range, and dead banding is rejecting small values to allow for errors in the joysticks resting position.

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