Completed Homework2.