Unit 01: Java Programming

Objectives:

In this Unit you will work with Java in three contexts: Java Elements with Karel, Data and Math, Java and FTC Robot programming. First, you will work with Java in the context of a 2D world with "Karel the Dog". Karel represents an object that can move about the world and add/remove markers. While these are elemental scenarios, there are five key concepts of Java you will work with:

5 Key Concepts of Java/Programming

  1. Java executes commands sequentially.

  2. How to define a Method in Java

  3. Use For Loops to repeat code when you know the length of the problem.

  4. Use While Loops to repeat code when you do not know the length of the problem.

  5. Conditionals like if and if/else allow the program to make decisions

Moving through a 2D grid and measuring/manipulating objects represents the core skills in computing and programming. You will use these five concepts through your entire programming career. Later in the course (Unit 3) we will see how moving through a 2D grid is used to manipulate media.

Java Programming with Data

Second, you will work with Java and math operators, conditional statements, and logic operators. In this unit we will begin the formal study of the Java Language to prepare for APCS A and provide the foundation for continued work in software in educational and professional environments.

Data Types:

Integers

Decimals

Strings

Characters

Boolean (True and False)

Math Operators

Logical Operators and Conditionals

Java Programming with FTC Robots:

The last three lessons work with Java and programming the FTC Robot using the REV Control Hub. You will use the API we developed with Python to program the robot to complete tasks. You will all also implement functions in Java to encode longer series of actions. Finally, you will write code specific to solve the engineering challenges of the current FIRST Tech Challenge Game.