Intro to Java
An introduction to the basics of Java that you'll need to get started.
Setup and Links
You can view the lecture slides and lab files here. Class Materials
Cheat Sheet
Java Coding Standards Always include class documentation Class names start with upper-case lette...
Labs
L01 - Visual Studio Code (VS Code) Lab
Install Visual Studio Code from FIRST, you will need their version with WPILib. Link In this exe...
L02 - Soda Can Lab
In this exercise, we're going to implement a class SodaCan. This class has a constructor that acc...
L03 - Coupons
A supermarket awards coupons depending on how much a customer spends on groceries. For example, i...
L04 - Iteration Lab - Part 1 - Nested For Loops
We can determine if a number is even or odd by checking the remainder after dividing the number b...
L04 - Iteration Lab - Part 2 - The Three Loops
Enter the following program and fill in the missing pieces so that the three different styles of ...
L05 - Using Arrays
Create a new class named UsingArrays. Using the lecture slides as a guide, declare and initializ...
L06 - Bank Account Lab
In this lab, we'll implement three classes: BankAccount, CheckingAccount, and BankAccountTest. As...
L07 - Shapes Lab
In this lab, we'll work with Abstract Classes. Start VS Code. During the lecture we discussed th...
L08 - Autopilot Interface Lab
In this lab, there is no main method, we are not running the code, just checking if it compiles w...
L09 - ReverseIt Lab
Write a program that reads in a file and writes each line backwards to an output file. Below is a...
L10 - Runtime Exceptions Lab
Runtime Exceptions Lab Using the lecture slides as a guide, In a new class, instantiate an array...
L11 - Designing Exception Types Lab
In this lab, we'll create our own exception class for the BankAccount class to handle the case wh...
L12 - Recursion Exercise
Part A – Fibonacci A recursive algorithm can be very fast. Sometimes it's the only solution to a ...
L13 - Finite State Machines
Introduction – Making Change Finite State Machines(FSMs) are a method to organize a system of in...
Lab Solutions
If solutions are not available we are teaching a class and they are hidden so students don't chec...
L01
Test.java /** * Print the Answer to Life, the Universe, Everything. * * @author Brandon * @v...
L02
SodaCan.java /** * Constructor and methods for a soda can object * * @author Brandon * @vers...
L03
Coupons.java import java.util.Scanner; public class Coupons { public static void main(String...
L04 - Part 1
Patterns.java public class Patterns { public static void main(String[] args) { for (i...
L04 - Part 2
Loops.java public class Loops { public static void main(String[] args) { // sum the n...
L05
UsingArrays.java public class UsingArrays { public static void main(String[] args) { ...
L06
BankAccount.java /** * Parent BankAccount class * * @author Brandon * @version 1/1/1990 */ ...
L07
Shape.java public abstract class Shape { private String shapeName; public Shape() { ...
L08
AutoPilot.java public interface Autopilot { final double MAX_AIRSPEED = 550; double airsp...
L09
ReverseIt.java /** * Reverses each line of an input file and writes it to an output file. * * @...
L10
ExceptionsLab.java import java.util.Scanner; public class ExceptionLab { public static void...
L11
InsufficientFunds.java public class InsufficientFunds extends RuntimeException{ public Insuff...
L12
FibonacciTest.java import java.util.*; public class FibonacciTest { public static void main(...