Added source code for assign 7.