diff --git a/examples/stage0/snippets/JavaFundamentals.java b/examples/stage0/snippets/JavaFundamentals.java index cc8953ee..150edae5 100644 --- a/examples/stage0/snippets/JavaFundamentals.java +++ b/examples/stage0/snippets/JavaFundamentals.java @@ -11,26 +11,26 @@ void main() { // [printLiteral] - System.out.print("hello!"); + System.out.println("hello!"); // [/printLiteral] // [printVariable] int number = 4; - System.out.print(number); // prints out the value 4 + System.out.println(number); // prints out the value 4 // [/printVariable] // [singleLineComment] // This prints Hello World - System.out.print("Hello World"); + System.out.println("Hello World"); // [/singleLineComment] // [inlineComment] - System.out.print("Hello World"); // This prints Hello World + System.out.println("Hello World"); // This prints Hello World // [/inlineComment] // [multiLineComment] /* This prints Hello World This is another line */ - System.out.print("Hello World"); + System.out.println("Hello World"); // [/multiLineComment] } diff --git a/examples/stage0/snippets/Operators.java b/examples/stage0/snippets/Operators.java index e7b8b934..aecf4f1a 100644 --- a/examples/stage0/snippets/Operators.java +++ b/examples/stage0/snippets/Operators.java @@ -12,36 +12,39 @@ void main() { // [multiplication] int magicNumber = 6; - System.out.print(magicNumber * 2); + System.out.println(magicNumber * 2); // [/multiplication] // [increments] int x = 6; int y = 7; - System.out.println(x++); - System.out.println(y--); + x++; // x is now 7! + y--; // y is now 6! + + System.out.println(x); // prints 7 + System.out.println(y); // prints 6 // [/increments] // [arithmetic] int a = 10; int b = 5; - a += 1; + a += 2; b -= 1; - System.out.println(a); // prints 11 + System.out.println(a); // prints 12 System.out.println(b); // prints 4 // [/arithmetic] // [comparison] int c = 2; int d = 4; - System.out.print(c > d); + System.out.println(c > d); // prints false // [/comparison] // [logical] - boolean fiveIsGreaterThanThree = 5 > 3; // True - boolean nineIsLessThanTwo = 9 < 2; // False + boolean fiveIsGreaterThanThree = 5 > 3; // true + boolean nineIsLessThanTwo = 9 < 2; // false System.out.println(fiveIsGreaterThanThree && nineIsLessThanTwo); System.out.println(fiveIsGreaterThanThree || nineIsLessThanTwo); diff --git a/src/content/docs/learning-course/index.mdx b/src/content/docs/learning-course/index.mdx index deb95772..0e98db18 100644 --- a/src/content/docs/learning-course/index.mdx +++ b/src/content/docs/learning-course/index.mdx @@ -7,11 +7,13 @@ next: false import CourseSection from '@components/CourseSection.astro'; -Welcome to FRCSoftware's learning course! The purpose of this course is to help students learn how to program an FRC robot no matter their skill level. +Welcome to FRCSoftware's learning course! +The purpose of this course is to help students learn how to program an FRC robot no matter their skill level. The progression of the course moves from learning how to write Java to programming robots of increasing complexity. We start individual mechanisms of robots, using the FRC Kitbot, then move to more complex robots. -Software in FRC is always changing! If you want to give feedback or have comments, feel free to do so through our [Github](https://github.com/frcsoftware/frcsoftware.org) +Software in FRC is always changing! +If you want to give feedback or have comments, feel free to do so through our [GitHub](https://github.com/frcsoftware/frcsoftware.org) or [Discord.](https://discord.com/invite/uUugPrPZFs) Java is a case-sensitive programming language! @@ -77,8 +81,8 @@ Semi-colons are used commonly in programming and aren’t only for creating vari We will see more examples of this later in the course. In FRC, variables can be used to hold information about the robot and its different mechanisms. -The example below shows 3 variables that were used for a climber mechanism, CLIMBER_ID is an integer that holds the motor controller ID number which is 51. -UP_POSITION is a double that holds the value -33.5 and DOWN_POSITION is a double that holds the value 0. +The example below shows 3 variables that were used for a climber mechanism, `CLIMBER_ID` is an integer that holds the motor controller ID number which is 51. +`UP_POSITION` is a double that holds the value -33.5 and `DOWN_POSITION` is a double that holds the value 0. ```java #variables @@ -138,7 +142,7 @@ Whether you put your comments preceding or alongside code is up to you and what Multi-line Comments start with `/*` and end with `*/` The text or code that is in between the two will turn into comments. Multi-line Comments are commonly used when you have many lines of text or need to turn a large amount of code into a comment. -For example, this is a comment with two lines of text +For example, this is a comment with two lines of text. ```java #multiLineComment diff --git a/src/content/docs/learning-course/stage0/operators.mdx b/src/content/docs/learning-course/stage0/operators.mdx index 11bd2ed5..37ee5d28 100644 --- a/src/content/docs/learning-course/stage0/operators.mdx +++ b/src/content/docs/learning-course/stage0/operators.mdx @@ -196,19 +196,20 @@ For now, we can use the operators to change variables without using conditionals Operator Description + Compatible Data Types Example `++` - Increment: add 1 to a variable + Increment: adds 1 to a variable int, double `a++` `--` - Decrement: subtracts 1 to a variable + Decrement: subtracts 1 from a variable int, double `a--` diff --git a/src/content/docs/learning-course/stage1/stage-overview.mdx b/src/content/docs/learning-course/stage1/stage-overview.mdx index 30edaf44..97e6200b 100644 --- a/src/content/docs/learning-course/stage1/stage-overview.mdx +++ b/src/content/docs/learning-course/stage1/stage-overview.mdx @@ -5,7 +5,8 @@ prev: false next: stage-1a/stage-overview --- -Congratulations! Whether you already know Java, have programmed an FRC robot before, +Congratulations! +Whether you already know Java, have programmed an FRC robot before, or are a complete beginner, you should have a good grasp of the basic syntax of the Java language by now. In Stage 1, we'll be moving on to the exciting part: actually writing code for a robot! It might seem daunting at first, but the best way to think through it is to focus on understanding diff --git a/src/content/docs/learning-course/stage1/stage1a/stage-overview.mdx b/src/content/docs/learning-course/stage1/stage1a/stage-overview.mdx index 516030ca..80c5a487 100644 --- a/src/content/docs/learning-course/stage1/stage1a/stage-overview.mdx +++ b/src/content/docs/learning-course/stage1/stage1a/stage-overview.mdx @@ -57,8 +57,9 @@ You can see that all the `Main.java` file is doing is, quite literally, starting so there's really no reason to edit this file for now. ### `Robot.java` @@ -103,7 +104,8 @@ We've set this up for you already; you'll just have to set up the simulation sof ### The 2026 Kitbot -But what is all this code actually going to control? Well, the answer is the 2026 FIRST Robotics Competition kitbot, the best starting point +But what is all this code actually going to control? +Well, the answer is the 2026 FIRST Robotics Competition kitbot, the best starting point for new FRC teams, as well as the simplest robot to get fully working. You can watch the below video to learn more about what functionalities the kitbot has. If you're a bit confused after watching that video, don't worry. @@ -111,7 +113,8 @@ We'll explain the kitbot more in depth in the next section. -And that's all you need to know to get started! The rest of Stage 1A will cover how to get from the template code to a working kitbot. +And that's all you need to know to get started! +The rest of Stage 1A will cover how to get from the template code to a working kitbot. This stage will cover the following topics: