This is the second part of the homework assignment.