Completed code as well as final test case.

Assignment completed with all evaluation criteria met.  Both functions
commented well and both functions work correctly.