Java Lab Week 1

Instructions

  1. This project/repo was created for you from GitHub classroom.
  2. Copy the URL of this repository in your own GitHub account
  3. In IntelliJ, open the VCS menu and select Checkout from Version Control and then GitHub
  4. In the window that opens, paste the GitHub URL into the Git Repository URL field.
  5. Optionally, set the directory that this code should download into. Click Clone.
  6. Click Yes for the Checkout From Version Control, Would you like to create an IntelliJ IDEA project... dialog
  7. New window/this window - your choice
  8. A popup will open saying "Maven projects need to be imported". Click Import Changes.
  9. Open the files in src/main/java/week_1. Read the instructions, look for the //TODO messages and finish the code.
  10. Run the code and test to make sure it is working correctly
  11. And, run the automatic tests to check your code. Right-click on src/test/java and select "Run All Tests".

Tests

The tests will all fail at first. As you work on the code, run and test your programs, and also run the automatic tests.

There is one test file for each lab question. You can run all of the tests, or run them individually. Right-click on one individual test files from the src/test/java/test_week_1 directory, and select the Run option, to run one at a time.

Red bars indicate failing tests. You'll also see a report with the number of test failures. When a test fails, it should print a message saying why it failed. Read that, and use that to help get your code working.

Green bars indicate passing tests. Yay!

The autograder uses a similar set of tests to grade your lab work. So make sure your tests pass!

Submitting your work

Once you've finished the lab, commit all of your new code, and push it to GitHub.

  1. Click the Commit button - the green up arrow in the tool bar
  2. Type a commit message
  3. Hover over the commit button then select Commit and Push
  4. In the next dialog window, click Push
  5. Verify you see your code in your GitHub page

Help??!!

Please ask Dan if you have any questions, or need help.