GM Financial interview question

Coding assessment in Java that was fairly average in difficulty.