My complete solution for this assignment