Twelve Problems

This exercise will let you practice your algorithmic skills from 120 in a new Java context.

You will do this exercise by yourself.

What to do

  1. Import the TwelveProblems project from your individual git repository by following these instructions.
  2. Fill in the missing functions in TwelveProblems.java
  3. Run the included unit tests to ensure you solution works
  4. Submit your code by committing and pushing your solution to your individual git repository.

Rubric

Each problem is worth 5 points.

Total possible: 60 points.

The problems themselves are already reasonably documented — don’t worry about writing Javadocs on this program but do keep your code clean, well formatted, and understandable.

Notes

The specification of each of the problems is in the TwelveProblems code as comments. Write each of the 12 functions in that file. To solve the problems, you will likely have to look up details in your textbook – not every function you will need is covered in class. The problems have notes indicating what constructs are required to solve them.

All the problems have unit tests which can run to ensure your solution works as expected. Do run the unit tests to help check yourself. However, the unit tests are not designed to be exhaustive - your code has to be correct for all inputs, even ones not specified in the unit tests