Java

Resources

Configuring Codio Debugger

Java Java

Java 2 Java 2

Make sure the application section of build.gradle is set to the correct application.

Can copy unit test code to a test main function for testing. Codio doesn’t have a good way to individually debug a single unit test, but some IDEs do.

Gradle Changes

Added entries in the application section for both programs. Can comment/uncomment as needed.

application {
    // Define the main class for the application.
    mainClass = 'tictactoe.TicTacToe'
    // mainClass = 'sudoku.SudokuFourModel'
}

Outline

Here is a basic outline of the steps to follow to complete this example.

  1. Clone Starter Code from GitHub
git clone <url> java
  1. Install SDKMAN

Instructions

curl -s "https://get.sdkman.io" | bash
  1. Close and Reopen Terminal to load SDK Man

  2. Install Gradle

sdk install gradle 7.6
  1. Compile, Run & Test Existing Project
cd java
gradle run
gradle test
gradle check
  1. Confirm that project runs, no style errors, and tests execute (some tests will fail).

  2. Fix Code to Pass Unit Tests. Use Codio debugger and/or Logging

  3. Add logging to both files

  4. Add README.md and discuss how you solved the errors.

  5. Confirm that project runs and all tests pass.

  6. When complete, use Git to commit and push updated code.

git add .
git commit -m "Example Complete"
git push
  1. On GitHub, create a release tag and submit URL to Canvas for grading.