Completed assignment #2

Completed and polished code for programming assignment #2.