I filled in the details for the two contained functions.

This completes Programming Assignment #2.